Skip to content

Commit

Permalink
Fix incorrect subscription on demo (#405)
Browse files Browse the repository at this point in the history
This PR fixes an incorrect subscription on one of the demos. Running
```
ros2 launch ros_gz_sim_demos gpu_lidar_bridge.launch.py
```
causes rviz2 to crash and exit with the error:
```
rviz2-3]
[rviz2-3] >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
[rviz2-3] This error state is being overwritten:
[rviz2-3]
[rviz2-3]   'create_subscription() called for existing topic name rt/lidar with incompatible type sensor_msgs::msg::dds_::PointCloud2_, at ./src/subscription.cpp:146, at ./src/rcl/subscription.c:108'
[rviz2-3]
[rviz2-3] with this new error message:
[rviz2-3]
[rviz2-3]   'invalid allocator, at ./src/rcl/subscription.c:218'
[rviz2-3]
[rviz2-3] rcutils_reset_error() should be called after error handling to avoid this.
```
This is due to an incorrect subscription on the part of the demo. This
PR fixes it by getting a subscription to the right topic for the
pointcloud display. (`lidar/points` instead of `lidar`). Was tested on
garden + humble.

Signed-off-by: Arjo Chakravarty <arjoc@intrinsic.ai>
  • Loading branch information
arjo129 authored and ahcorde committed Jun 8, 2023
1 parent e94d406 commit 8e956d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ros_ign_gazebo_demos/rviz/gpu_lidar_bridge.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Visualization Manager:
Size (Pixels): 3
Size (m): 0.009999999776482582
Style: Flat Squares
Topic: /lidar
Topic: /lidar/points
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Expand Down

0 comments on commit 8e956d6

Please sign in to comment.