Unable to visualize point cloud in rviz2 using rosbag in ros2
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 ros1bridge dynamicbridge --bridge-all-topics
Asked by Robo_guy on 2022-01-09 08:31:18 UTC
Answers
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:
Asked by rodrigo55 on 2022-01-19 13:40:55 UTC
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 ?
Asked by Robo_guy on 2022-01-20 00:16:11 UTC
@rodrigo55 can you please tell what could be the issue here ?
Asked by Robo_guy on 2022-01-25 00:31:56 UTC
Comments