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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect subscription on demo #405

Merged
merged 1 commit into from
Jun 6, 2023

Commits on Jun 6, 2023

  1. Fix incorrect subscription on demo

    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>
    arjo129 committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    3bbafd1 View commit details
    Browse the repository at this point in the history