ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unable to visualize point cloud in rviz2 using rosbag in ros2

asked 2022-01-09 07:31:18 -0500

Robo_guy gravatar image

updated 2022-01-19 23:17:23 -0500

Hello, I am trying to use laser assembler package in ros2. I play the ros1 recorded rosbag having laser scan data but I am unable to see the generated point cloud in rviz2 in ros2. Please can anyone tell me what could be the issue and how this can be solved ? I am using this command to run the rosbag in ros2 which I have recorded in ros1 - ros2 run ros1_bridge dynamic_bridge --bridge-all-topics

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-01-19 12:40:55 -0500

rodrigo55 gravatar image

Hi, I assume you are talking about the laser_assembler package in ROS1. For this, you can play your rosbag, and then the laser_assembler. Notice that this is only a service server, so you have to call it in order to obtain a pointcloud topic as an output. So basically, this should be your setup:

ROS1:

  • Play rosbag
  • laser_assembler service server
  • Program that calls the server to publish pointcloud topic

ROS2:

  • ros1_bridge
  • rviz2 with the pointcloud topic to visualize it

If you want to see how I did what I mentioned above step by step, you can check out this video I made:

https://youtu.be/HeTGfEdWdLs

edit flag offensive delete link more

Comments

Hi, thank you for the answer, I watched the video it is helpful. Actually I am sorry I wrote rviz but actually I meant rviz2 and also I did not include exact details of the problem I am facing. So there exists a laser assembler package for ros2 also which I am using. So here is what I am doing -

  • Simulating turtlebot and playing rosbag to record scan topic in ros1.
  • Running this ros2 run ros1_bridge dynamic_bridge --bridge-all-topics.
  • Playing the recorded rosbag file.
  • Running the laser assembler launch file and service caller script in ros2.
  • Running rviz2 for visualizing the point cloud.

Here is where I am facing the issue, I can visualize the laser scans on the laser scan topic in rviz2 but cannot see the point cloud on the published point cloud topic in rviz2. Can you tell what could be the issue ?

Robo_guy gravatar image Robo_guy  ( 2022-01-19 23:16:11 -0500 )edit

@rodrigo55 can you please tell what could be the issue here ?

Robo_guy gravatar image Robo_guy  ( 2022-01-24 23:31:56 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-01-09 07:31:18 -0500

Seen: 587 times

Last updated: Jan 19 '22