Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

OpenMower

From World Wide Wiegert Wiki - WWWW
Revision as of 09:42, 18 April 2023 by Damme (talk | contribs) (Created page with "Subscribers: 1. cmd_vel_sub: Subscribes to the cmd_vel topic. ◦ Message Type: geometry_msgs::Twist ◦ Description: Contains the desired linear and angular velocities for the robot. ◦ Contents: ▪ linear.x: Linear velocity in the x-axis direction (m/s). ▪ linear.y: Linear velocity in the y-axis direction (m/s). ▪ linear.z: Linear velocity in the z-axis direction (m/s). ▪ angular.x: Ang...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Subscribers:

   1. cmd_vel_sub: Subscribes to the cmd_vel topic.
       ◦ Message Type: geometry_msgs::Twist
       ◦ Description: Contains the desired linear and angular velocities for the robot.
       ◦ Contents:
           ▪ linear.x: Linear velocity in the x-axis direction (m/s).
           ▪ linear.y: Linear velocity in the y-axis direction (m/s).
           ▪ linear.z: Linear velocity in the z-axis direction (m/s).
           ▪ angular.x: Angular velocity around the x-axis (rad/s).
           ▪ angular.y: Angular velocity around the y-axis (rad/s).
           ▪ angular.z: Angular velocity around the z-axis (rad/s).
   2. high_level_status_sub: Subscribes to the /mower_logic/current_state topic.
       ◦ Message Type: mower_msgs::HighLevelStatus
       ◦ Description: Receives the high-level state of the mower from the mower logic node. This state includes information about the current operating mode, substate, GPS quality, battery status, charging status, and emergency flag.
       ◦ Fields:
           ▪ state: An integer representing the current high-level state of the mower (e.g., idle, autonomous, recording, etc.).
           ▪ state_name: A string representing the name of the current high-level state (e.g., "IDLE", "AUTONOMOUS", "RECORDING").
           ▪ sub_state_name: A string representing the name of the current substate (e.g., "SUBSTATE_1", "SUBSTATE_2", "SUBSTATE_3", "SUBSTATE_4").
           ▪ gps_quality_percent: A float32 value representing the GPS quality as a percentage, where 0% indicates no GPS signal and 100% indicates a perfect GPS signal.
           ▪ battery_percent: A float32 value representing the battery charge level as a percentage, where 0% indicates an empty battery and 100% indicates a fully charged battery.
           ▪ is_charging: A boolean value indicating whether the mower is currently charging or not.
           ▪ emergency: A boolean value indicating if there is an active emergency situation, such as a collision, detected by the mower.
       ◦ Callback Function: highLevelStatusReceived
           ▪ Description: Handles the received high-level state of the mower, updating the internal state representation for the mower communication node.

Publishers:

   1. status_pub: Publishes to the /mower/status topic.
       ◦ Message Type: mower_msgs::Status
       ◦ Description: Publishes the current status of the mower, including information about the mower's low-level systems, power status, ultrasonic range measurements, emergency status, battery, and ESC statuses.
       ◦ Fields:
           ▪ stamp: A time object representing the timestamp of the message.
           ▪ mower_status: An integer representing the mower's status, such as initializing or OK.
           ▪ raspberry_pi_power: A boolean value indicating if the Raspberry Pi has power.
           ▪ gps_power: A boolean value indicating if the GPS module has power.
           ▪ esc_power: A boolean value indicating if the Electronic Speed Controllers (ESCs) have power.
           ▪ rain_detected: A boolean value indicating if rain is detected.
           ▪ sound_module_available: A boolean value indicating if the sound module is available.
           ▪ sound_module_busy: A boolean value indicating if the sound module is busy.
           ▪ ui_board_available: A boolean value indicating if the UI board is available.
           ▪ ultrasonic_ranges: An array of 5 float32 values representing the ultrasonic range measurements.
           ▪ emergency: A boolean value indicating if there is an active emergency situation, such as a collision, detected by the mower.
           ▪ v_charge: A float32 value representing the charge voltage.
           ▪ v_battery: A float32 value representing the battery voltage.
           ▪ charge_current: A float32 value representing the charge current.
           ▪ left_esc_status: An ESCStatus object containing information about the status of the left ESC.
           ▪ right_esc_status: An ESCStatus object containing information about the status of the right ESC.
           ▪ mow_esc_status: An ESCStatus object containing information about the status of the mow ESC.
   2. wheel_tick_pub: Publishes the mower/wheel_ticks topic.
       ◦ Message Type: xbot_msgs::WheelTick
       ◦ Description: Publishes the wheel tick information for the left and right wheels of the mower, which is used to calculate odometry.
       ◦ Fields:
           ▪ header: Standard ROS message header containing a timestamp and frame_id.
           ▪ left_ticks: The number of ticks for the left wheel since the last message.
           ▪ right_ticks: The number of ticks for the right wheel since the last message.
           ▪ interval: The time interval in seconds between the current and previous wheel tick message.
   3. sensor_imu_pub: Publishes to the imu/data_raw topic.
       ◦ Message Type: sensor_msgs::Imu
       ◦ Description: Provides raw IMU data, including linear acceleration and angular velocity.
       ◦ Contents:
           ▪ header: Message header, containing timestamp and frame ID.
           ▪ orientation: Orientation as a quaternion (x, y, z, w).
           ▪ orientation_covariance: Orientation covariance matrix (3x3).
           ▪ angular_velocity: Angular velocity vector (x, y, z) in rad/s.
           ▪ angular_velocity_covariance: Angular velocity covariance matrix (3x3).
           ▪ linear_acceleration: Linear acceleration vector (x, y, z) in m/s^2.
           ▪ linear_acceleration_covariance: Linear acceleration covariance matrix (3x3).
   4. sensor_mag_pub: Publishes to the imu/mag topic.
       ◦ Message Type: sensor_msgs::MagneticField
       ◦ Description: Provides magnetic field data from the IMU.
       ◦ Contents:
           ▪ header: Message header, containing timestamp and frame ID.
           ▪ magnetic_field: Magnetic field vector (x, y, z) in Tesla.
           ▪ magnetic_field_covariance: Magnetic field covariance matrix (3x3).

Services:

   1. mow_service: Advertises the mower_service/mow_enabled service.
       ◦ Service Type: std_srvs::SetBool
       ◦ Description: Allows enabling or disabling the mower's mowing functionality.
       ◦ Request Fields:
           ▪ data: A boolean value representing the desired state of the mower's mowing functionality. True for enabling and False for disabling.
       ◦ Response Fields:
           ▪ success: A boolean value indicating if the requested operation was successful.
           ▪ message: A string providing additional information about the outcome of the operation.
   2. emergency_service: Advertises the mower_service/emergency service.
       ◦ Service Type: std_srvs::Trigger
       ◦ Description: Triggers an emergency stop for the mower.
       ◦ Request Fields: No fields required.
       ◦ Response Fields:
           ▪ success: A boolean value indicating if the emergency stop was successfully triggered.
           ▪ message: A string providing additional information about the outcome of the operation.