Skip to content

Custom ROS Messages

Kaelin Laundry edited this page Aug 25, 2019 · 4 revisions

Introduction

This page documents the custom ROS messages defined in aruw_msgs that we use for data transfer between nodes. See: our ROS topic network. The .msg files are found in the folder aruw_msgs/msg.

1. AutoAimDataMessage

Usage

Contains the turret aim data to be sent to the main controller that is used to control the turret

Content

Type name Description
float32 pitch desired gimbal pitch bearing
float32 yaw desired gimbal yaw bearing
bool has_target is there currently a valid target being aimed at

Topics using

  • serial/turret_aim

Files using

  • aruw_vision/src/aim_turret.py
  • aruw_tf_broadcaster/src/tf-broadcaster.py
  • aruw_serial/src/serial_node.py

2. AutoAimRequestMessage

Usage

Contains the command from the main controller specifying whether to turn on or turn off auto aim

Content

Type name Description
bool enable_auto_aim is the command to enable or to disable auto aim

Topics using

  • serial/auto_aim_request

Files using

  • aruw_vision/src/aim_turret.py
  • aruw_serial/src/serial_msg_classes.py

3. McbOdomMessage

Usage

Contains sensor (IMU and wheel motor encoders) data from the main controller to be used for odometry calculations

Content

Type name Description
ROS Header header used for containing timestamp of receiving
float32 ax raw accelerometer reading for x-axis from the IMU
float32 ay raw accelerometer reading for y-axis from the IMU
float32 az raw accelerometer reading for z-axis from the IMU
float32 rol IMU roll angle, filtered by main controller
float32 pit IMU pitch angle, filtered by main controller
float32 yaw IMU yaw angle, filtered by main controller
float32 wx raw gyroscope reading for wx from the IMU
float32 wy raw gyroscope reading for wy from the IMU
float32 wz raw gyroscope reading for wz from the IMU
float32 rf_rpm RPM of the right front wheel
float32 lf_rpm RPM of the left front wheel
float32 lb_rpm RPM of the left back wheel
float32 rb_rpm RPM of the right back wheel

Note: for the sentry, the main controller still sends back 4 readings for wheel RPM despite only having 2 drive motors. For the sentry, lb_rpm and rb_rpm are duplicates of rf_rpm and lb_rpm respectively.

Topics using

  • serial/imu (TODO: change the name of this topic so its more semantic)

Files using

  • aruw_odometry/src/drive_odometry.py
  • aruw_odometry/src/four_wheel_mecanum_drive.py
  • aruw_odometry/src/sentinel_drive.py
  • aruw_serial/src/serial_msg_classes.py

4. RobotIdMessage

Usage

Contains the Robot ID byte sent by the referee system. Format according to officially provided document. We use this to determine which team the robot is on and which type it is so that we can run the correct odometry process.

Content

Type name Description
uint8 robot_id Robot ID byte. Per the documentation, ranges from 1-7 and 11-17

Topics using

  • serial/robot_id

Files using

  • aruw_common/src/common_utils.py
  • aruw_serial/src/serial_msg_classes.py

5. TurretAimFeedbackMessage

Usage

Feedback from the main controller that specifies the turret's current pitch and yaw bearings. We currently only use this for visualization.

Content

Type name Description
float32 pitch reported gimbal pitch bearing
float32 yaw reported gimbal yaw bearing

Topics using

  • serial/turret_aim_feedback

Files using

  • aruw_tf_broadcaster/src/tf-broadcaster.py
  • aruw_serial/src/serial_msg_classes.py