Need help to get coordinates from rviz running rplidar

asked 2019-11-07 13:02:55 -0500

Aarrick gravatar image

updated 2022-05-23 10:08:09 -0500

lucasw gravatar image

Hello everyone, I am running ROS Melodic on raspberry pi 4 (Debian). I have installed rplidar as well as Hector_Slam and both are running fine. I can view track my sensor as well as view the map in rviz now. The point is that I want to extract the coordinates of the points that are shown in rviz and use that to create my own map. I have tried using rosbag record to record the bag file. I run the roscore and open rviz and then play the bag file using rosbag play but the rviz does not show anything. I do not know if my bag file contains the data I need. I do not know how pointcloud, laserscan or pointcloud2 works in rviz. Could you please help me with this? I am stuck in this step for far too long. Thank you for your time. Much appreciate!

edit retag flag offensive close merge delete

Comments

What command did you use to record data to rosbag?

NAGALLA DEEPAK gravatar image NAGALLA DEEPAK  ( 2019-11-09 01:07:51 -0500 )edit

I used $ rosbag record -a to record everything. I tried using $ rosbag record /scan as well. Both didnt work.

Aarrick gravatar image Aarrick  ( 2019-11-09 01:19:00 -0500 )edit

Can you play your rosbag alone in one terminal and in a new terminal, enter $ rostopic list and see which topics have shown up?

NAGALLA DEEPAK gravatar image NAGALLA DEEPAK  ( 2019-11-09 01:24:13 -0500 )edit

This is what I see in the terminal while a bag file is playing: pi@raspberrypi:~ $ rostopic list /clock /initialpose /map /map_metadata /move_base_simple/goal /poseupdate /rosout /rosout_agg /scan /slam_cloud /slam_out_pose /tf /tf_static pi@raspberrypi:~ $

Aarrick gravatar image Aarrick  ( 2019-11-09 18:25:49 -0500 )edit

Is any data showing up when you do $ rostopic echo /scan other than 'NAN' or '0'? Also, how is your RPi being powered up?

NAGALLA DEEPAK gravatar image NAGALLA DEEPAK  ( 2019-11-09 23:20:20 -0500 )edit

A lot of data shows up while i use that code. Also, I am using 5v adapter to power my raspberry pi.

Aarrick gravatar image Aarrick  ( 2019-11-11 10:50:13 -0500 )edit

Can you share your ROS bag?

NAGALLA DEEPAK gravatar image NAGALLA DEEPAK  ( 2019-11-12 21:44:19 -0500 )edit

Deepak, sorry for the late reply. Here is the bag file. https://drive.google.com/file/d/1xHQU...

Please help me extract coordinates of the points for each revolution.

Aarrick gravatar image Aarrick  ( 2019-11-15 10:50:37 -0500 )edit