nasa / astrobee

NASA Astrobee Robot Software

Home Page:https://www.nasa.gov/astrobee

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ROS2 Astrobee simulation - executive conversion

ana-GT opened this issue · comments

commented

Hi. Recently I needed to run Astrobee in ROS2 and wanted to be able to do the following:

  1. See the images from dock/nav cam.
  2. Use the undock behavior.
  3. Send the Astrobee simple one-point goals.
  4. Run a multi-robot simulation, with Bumble and Honey.

To do this, the management/executive is needed. I took as reference Katie's PR: #777 and added the following modifications:

  1. Converted sys_monitor.
  2. Fix the way in which ConfigClient is given a node argument (otherwise it crashes due to its using SyncParametersClient).
  3. Fix a few bugs in the time utilities (seconds were being converted to nanoseconds).
  4. Fix a few bugs in the launch files (specifically, use_sim_time was not being set in the right parameter field).
  5. Upgrade Gazebo to be version 11.14. Current version in the rolling image is 11.11 (which makes sense, as this is the latest version that was available last April, when the rolling image for astrobee was last built). This version is needed for the nav_cam/dock_cam sensors (wideanglecamera) to be parsed.
  6. Added a few edits to the launch files to support the namespacing of launch files (using PushRosNamespace)
  7. Add the robot_namespace parameter for the gazebo spawn node.

My changes are in this branch: https://github.com/traclabs/astrobee/tree/ros2_executive . With these changes I am currently able to undock the robot and move it around, either in the default setup or with Bumble/Honey (video attached).

I'd be happy to send a PR if it is helpful, thanks!

Multi-robot testing:

multiple_astrobees_ros2_5x_hb.mp4

Default robot testing

astrobee_ros2_migration_5x_hb.mp4
commented

Forgot to mention: To test:

Default setup:

  1. Start the robot: ros2 launch astrobee sim.launch.py gtloc:=true debug:=true rviz:=true
  2. In another terminal, call undock: ros2 run executive teleop_tool -undock
  3. Once the robot is undocked, move it around: ros2 run executive teleop_tool -move -relative -pos "0 2 0.5"

Multi-robot setup:

  1. Start the robot: ros2 launch astrobee sim.launch.py gtloc:=true debug:=true rviz:=true default_robot:=false bumble:=true honey:=true
  2. Move Bumble: ros2 run executive teleop_tool -move -relative -pos "0 -1 0.5" -ns bumble
  3. Move Honey: ros2 run executive teleop_tool -move -relative -pos "0 1 0.5" -ns honey