iRobotEducation / irobot_create_msgs

Action, message and service definitions used by the iRobot® Create® Platform
BSD 3-Clause "New" or "Revised" License
31 stars 8 forks source link

ROS2 Humble msg/xyz is invalid #13

Closed brianlmerritt closed 1 year ago

brianlmerritt commented 1 year ago

Bug report

Required Info:

Steps to reproduce issue

Once the Create3 is setup with the Raspberry Pi on ROS2 Humble the command ros2 topic list produces a number of create topics, which because I used multi robot are name spaced to create3_1

ros2 topic list
/create3_1/battery_state
/create3_1/cmd_audio
/create3_1/cmd_lightring
/create3_1/cmd_vel
/create3_1/dock
/create3_1/hazard_detection
/create3_1/imu
/create3_1/interface_buttons
/create3_1/ir_intensity
/create3_1/ir_opcode
/create3_1/kidnap_status
/create3_1/mobility_monitor/transition_event
/create3_1/mouse
/create3_1/odom
/create3_1/robot_state/transition_event
/create3_1/slip_status
/create3_1/static_transform/transition_event
/create3_1/stop_status
/create3_1/tf
/create3_1/tf_static
/create3_1/wheel_status
/create3_1/wheel_ticks
/create3_1/wheel_vels
/parameter_events
/rosout

# Note the output looks fine but when I ask to echo certain topics I get msg/xyz is invalid
ros2 topic echo /create3_1/interface_buttons
The message type 'irobot_create_msgs/msg/InterfaceButtons' is invalid
ros2 topic info /create3_1/interface_buttons
Type: irobot_create_msgs/msg/InterfaceButtons
Publisher count: 1
Subscription count: 0

ros2 topic info /create3_1/cmd_vel
Type: geometry_msgs/msg/Twist
Publisher count: 0
Subscription count: 1

ros2 topic info /create3_1/mouse
Type: irobot_create_msgs/msg/Mouse
Publisher count: 1
Subscription count: 0

ros2 topic echo /create3_1/mouse
The message type 'irobot_create_msgs/msg/Mouse' is invalid

ros2 topic echo /create3_1/hazard_detection
The message type 'irobot_create_msgs/msg/HazardDetectionVector' is invalid

ros2 topic echo /create3_1/dock
The message type 'irobot_create_msgs/msg/Dock' is invalid

# Battery state and imu and cmd_vel appear to output fine

ros2 topic echo /create3_1/cmd_vel
# No error message, just nothing being published to cmd_vel
^C

ros2 topic echo /create3_1/battery_state
header:
  stamp:
    sec: 1672868536
    nanosec: 993744020
  frame_id: ''
voltage: 15.36299991607666
temperature: 33.349998474121094
current: 1.121000051498413
charge: 1.2070000171661377
capacity: 1.9299999475479126
design_capacity: 1.9299999475479126
percentage: 0.6299999952316284
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
---
header:
  stamp:
    sec: 1672868536
    nanosec: 993744020
  frame_id: ''
voltage: 15.36299991607666
temperature: 33.349998474121094
current: 1.121000051498413
charge: 1.2070000171661377
capacity: 1.9299999475479126
design_capacity: 1.9299999475479126
percentage: 0.6299999952316284
power_supply_status: 0
power_supply_health: 0
power_supply_technology: 0
present: true
cell_voltage: []
cell_temperature: []
location: ''
serial_number: ''
#etc etc

ros2 topic echo /create3_1/imu
header:
  stamp:
    sec: 1672868668
    nanosec: 2605891
  frame_id: base_link
orientation:
  x: -0.006137297488749027
  y: 0.034354306757450104
  z: -0.005191372707486153
  w: 0.9993773698806763
orientation_covariance:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
angular_velocity:
  x: -0.00029886630842941434
  y: 0.00022251620880920026
  z: -1.7444572041686814e-05
angular_velocity_covariance:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0

Expected behavior

Requesting a ros2 topic echo should result in either a long wait (nothing being published) or with the item being published

Actual behavior

See code above

Additional information

alsora commented 1 year ago

Hi @brianlmerritt, this error indicates that you haven't properly installed this package. You can use debian packages:

sudo apt-get update
sudo apt-get install ros-humble-irobot-create-msgs

Then remember to source the ros setup

source /opt/ros/humble/setup.bash
brianlmerritt commented 1 year ago

Ooops! Can you please ask the documentation people to split item 7 to

  1. Please add support for Create 3 messages

sudo apt install -y ros-humble-irobot-create-msgs

  1. We also recommend installing a few other packages:

sudo apt install -y build-essential python3-colcon-common-extensions python3-rosdep ros-humble-rmw-cyclonedds-cpp

  1. At this point, we recommend setting etc etc
brianlmerritt commented 1 year ago

Never mind, I did a pull request. Thanks for your help!