Skip to content

Conversation

civerachb-cpr
Copy link
Contributor

@civerachb-cpr civerachb-cpr commented Sep 30, 2025

All launch files (localization, slam, nav2) now support a scan_topic argument to override the 2d lidar input. By default this argument is blank, indicating that /{namespace}/sensors/lidar2d_0/scan should be used. If the argument is specified, we rewrite the necessary parameters to subscribe to the user's specified topic.

e.g. This robot.yaml

serial_number: a300-0000
version: 0
system:
  hosts:
    - hostname: cpr-albert
      ip: 127.0.0.1
  ros2:
    namespace: a300_0000
    domain_id: 42
    workspaces:
      - /home/robot/clearpath_common_ws/install/setup.bash
sensors:
  lidar3d:
    - model: velodyne_lidar
      urdf_enabled: true
      launch_enabled: true
      parent: base_link
      xyz: [0.0, 0.0, 0.0]
      rpy: [0.0, 0.0, 0.0]
      ros_parameters:
        velodyne_driver_node:
          frame_id: lidar3d_0_laser
          device_ip: 192.168.131.25
          port: 2368
          model: VLP16
        velodyne_transform_node:
          model: VLP16
          fixed_frame: lidar3d_0_laser
          target_frame: lidar3d_0_laser

does not have a 2d lidar, but does publish 2d scan data on .../sensors/lidar3d_0/scan. By launching the following, AMCL localization works in the simulator:

ros2 launch clearpath_gz simulation.launch.py
ros2 launch clearpath_nav2_demos localization.launch.py scan_topic:=/a300_0000/sensors/lidar3d_0/scan use_sim_time:=true
ros2 launch clearpath_nav2_demos nav2.launch.py scan_topic:=/a300_0000/sensors/lidar3d_0/scan use_sim_time:=true
ros2 launch clearpath_viz view_navigation.launch.py namespace:=/a300_0000 use_sim_time:=true

or for SLAM:

ros2 launch clearpath_gz simulation.launch.py
ros2 launch clearpath_nav2_demos slam.launch.py scan_topic:=/a300_0000/sensors/lidar3d_0/scan use_sim_time:=true
ros2 launch clearpath_nav2_demos nav2.launch.py scan_topic:=/a300_0000/sensors/lidar3d_0/scan use_sim_time:=true
ros2 launch clearpath_viz view_navigation.launch.py namespace:=/a300_0000 use_sim_time:=true

Copy link

mergify bot commented Sep 30, 2025

🧪 CI Insights

Here's what we observed from your CI run for 12535c4.

🟢 All jobs passed!

But CI Insights is watching 👀

@civerachb-cpr civerachb-cpr marked this pull request as ready for review October 7, 2025 17:46
@civerachb-cpr civerachb-cpr requested a review from a team as a code owner October 7, 2025 17:46
@civerachb-cpr civerachb-cpr requested review from roni-kreinin and tonybaltovski and removed request for a team October 7, 2025 17:46
@civerachb-cpr civerachb-cpr merged commit b54f082 into rc/jazzy/2.8 Oct 7, 2025
6 checks passed
@civerachb-cpr civerachb-cpr deleted the feature/scan_topic_arg branch October 7, 2025 17:46
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

Successfully merging this pull request may close these issues.

2 participants