Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS2 migration #72

Closed
15 tasks done
daisukes opened this issue Nov 2, 2022 · 3 comments
Closed
15 tasks done

ROS2 migration #72

daisukes opened this issue Nov 2, 2022 · 3 comments
Assignees

Comments

@daisukes
Copy link
Contributor

daisukes commented Nov 2, 2022

Current CaBot consists of ROS, ROS2, and the bridge between them. ROS noetic's support (Ubuntu 20.04 LTS support) will end in May 2025, so we still have two and a half years, but it may be a good time to move to ROS2 as it has matured enough. However, most of the components, except for the navigation stack (Nav2), need to be migrated to ROS2, so we may need to assess that all components can be migrated. If not, we need to consider keeping the bridge for the features that cannot be moved to ROS2. This migration can benefit the project through performance increase (TF and pointcloud2 related), complexity reduction related to navigation, and expansion of its life by 2027 (if we complete the second phase).

Migration phases

  • Phase 1
    • Ubuntu20.04, noetic, galactic Ubuntu20.04 - noetic + Ubuntu22.04 - humble / Ubuntu20.04 Host
    • migrate group by group, keeping the bridge active until all migrations are completed
    • need to rearrange topic flows
    • the following groups does not include full consideration of topic flow rearrangement
    • need to migrate nav2 custom code to humble branch
    • not optimized (not using composable node and type adapter)
  • Phase 2
    • optimization
    • Ace version support
      • Jetson
      • cabot_serial.py

Migration order by group

  • cabot_debug (Done)
  • arduino (Done)
  • people/queue (Done)
  • motor_controller (Done)
  • cabot (Done)
  • cabot_ui (Done)
  • localization (Done)
  • mapping
  • jetson
  • migrate additional changes to dev branch since Dec. 2022
  • clean unused (ROS1) packages / lint
  • description (gtm, ace)
  • cabot_sites
  • cabot-arduino-ace (ace)
  • cabot-app-server

Packages Status

package ROS2 migration category Migration group Status
pcl_ros (external) Yes ros1 cabot WIP
cartographer (external) Yes localization localization Done
cabot-arduino Yes Arduino arduino Done
WiFiScan Yes Arduino esp32 Done
cabot-arduino-ace Yes Arduino arduino @aksgibm
cabot-ble-server Yes Standalone ble @aksgibm
cabot_debug Yes host ros1 cabot_debug Done
cabot_msgs Yes ros1 cabot_ui Done
mf_localization_msgs Yes localization cabot_ui Done
cabot_ros_backpack Yes ros1 cabot_ui Pending
cabot_description Yes ros1 cabot Partial
cabot_ui Yes ros1 cabot_ui Done
cabot Yes ros1 cabot, cabot_ui Done
cabot_description2 Merge ros2 cabot_ui Partial (cabot2-gt1)
cabot_sites Yes ros1 cabot_ui Partial
cabot_wireless_simulator Yes localization gazebo Done
cabot_gazebo Yes ros1 gazebo Done
mf_localization Yes localization localization Done
mf_localization_gazebo Yes localization localization Done
mf_localization_mapping Yes localization localization Done
wireless_scanner_ros Yes localization localization Done
mf_localization_rviz Yes localization localization Done
cabot_mf_localization Merge localization localization Done
motor_controller Yes ros1 motor_controller, cabot Done
nav2_action_bridge Remove bridge N/A N/A
cabot_util ROS2 ros2 N/A N/A
cabot_bt ROS2 ros2 N/A N/A
cabot_navigation Remove ros1 N/A N/A
predict_people_py Yes people people Done
track_people_py Yes people people Done
track_people_cpp Yes people people Done
cabot_people Merge people people/queue Done
queue_people_py Yes people queue WIP (check)
queue_utils_py Yes people queue Done
@daisukes daisukes self-assigned this Nov 2, 2022
@daisukes
Copy link
Contributor Author

daisukes commented Nov 14, 2022

Gazebo migration tips

  1. if you want to remap gazebo sensor plugin topic, you need to add ros tag into the plugin description like following instead of add remapping to the gzserver launch
        <plugin filename="libgazebo_ros_imu_sensor.so" name="imu">
          <topicName>${prefix}/data</topicName>
          <bodyName>${frame}</bodyName>
          <updateRateHZ>100.0</updateRateHZ>
          <gaussianNoise>0.0</gaussianNoise>
          <xyzOffset>0 0 0</xyzOffset>
          <rpyOffset>0 0 0</rpyOffset>
          <frameName>${frame}</frameName>
	  <initial_orientation_as_reference>0</initial_orientation_as_reference>

	  <!-- remapping /imu/out, 'imu' is the plugin's name, 'out' is hard coded -->
	  <ros>
	    <argument>--ros-args</argument>
	    <argument>-r</argument>
	    <argument>/imu/out:=/cabot/imu/data</argument>
	  </ros>
        </plugin>
  1. To publish /gazebo/model_state, you need to add plugin description in each world file
  • this is not practical because we need to update all the world files, so I will write a code to append plugin description when the world file is specified for gazebo
  <world name='default'>
    <plugin name="gazebo_ros_state" filename="libgazebo_ros_state.so">
      <ros>
        <namespace>/gazebo</namespace>
      </ros>
      <update_rate>1.0</update_rate>
    </plugin>  

Related forum thread and issue
ros-simulation/gazebo_ros_pkgs#1157
https://answers.ros.org/question/360161/ros2-dashing-service-get_entity_state-is-missing/
ros-simulation/gazebo_ros_pkgs#1157

@daisukes
Copy link
Contributor Author

Tried to keep using galactic, but there were some issues, so changed it to humble during porting.

@daisukes
Copy link
Contributor Author

daisukes commented Jun 14, 2023

Public cabot_sites have been ported. Private cabot_sites should be ported too, but will not track here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant