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

[Forwardport Rolling] Fix incorrect subscription on demo (#405) #408

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

ahcorde
Copy link
Collaborator

@ahcorde ahcorde commented Jun 8, 2023

🦟 Bug fix

Summary

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.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

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>
@ahcorde ahcorde requested a review from mjcarroll June 8, 2023 08:39
@ahcorde ahcorde self-assigned this Jun 8, 2023
@osrf-triage osrf-triage added this to Inbox in Core development Jun 8, 2023
Core development automation moved this from Inbox to In review Jun 8, 2023
@ahcorde ahcorde merged commit 9c43819 into ros2 Jun 8, 2023
6 checks passed
Core development automation moved this from In review to Done Jun 8, 2023
@ahcorde ahcorde deleted the ahcorde/rolling/backport_405 branch June 8, 2023 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants