Need help to get coordinates from rviz running rplidar

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

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 imageNAGALLA DEEPAK ( 2019-11-09 01:07:51 -0600 )edit

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

Aarrick gravatar imageAarrick ( 2019-11-09 01:19:00 -0600 )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 imageNAGALLA DEEPAK ( 2019-11-09 01:24:13 -0600 )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 imageAarrick ( 2019-11-09 18:25:49 -0600 )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 imageNAGALLA DEEPAK ( 2019-11-09 23:20:20 -0600 )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 imageAarrick ( 2019-11-11 10:50:13 -0600 )edit