Ask Your Question
0

Rviz2 not showing lidar points

asked 2020-09-22 18:49:19 -0500

jerry_dong gravatar image

Hello here,

I'm new to ROS and ROS2, had some time long ago with a turtle bot and did some maze stuff but basically know nothing.

I just finished the beginner part of ROS2 tutorial and currently trying to pop up a lidar, a cheap lfcd2.

I managed to read the serial and installed the official driver and packages. The publishers looks fine to me, since I can see data in /scan topic.

Then I tried to visualize it using Rviz2, but the points doesn't show up. I tried to debug it but not sure whats wrong....

I found some solution to the missing tf issue using

ros2 run tf2_ros static_transform_publisher 1 2 3 0.5 0.1 -1.0 foo bar

It looks like works and my issue on location is gone.

Everything seems fine except my points still shows

Showing [0] points from [0] messages

and topic shows okay.

I then went to check some other people's example, where it should display number of msg, not 'okay'

I can't post photo since I don't have enough points... but here's a part of the /scan data:

header:
  stamp:
    sec: 1600816175
    nanosec: 408355311
  frame_id: laser
angle_min: 0.0
angle_max: 6.2657318115234375
angle_increment: 0.01745329238474369
time_increment: 2.990000029967632e-05
scan_time: 0.0
range_min: 0.11999999731779099
range_max: 3.5
ranges:
- 0.0
- 0.2290000021457672
- 0.0
- 0.0
- 0.0
- 0.0
- 1.0720000267028809
- 0.6299999952316284
- 0.6299999952316284
- 0.5460000038146973
- 0.5389999747276306
- 0.5329999923706055
- 0.5410000085830688
- 0.5619999766349792
- 0.3529999852180481
- 0.38600000739097595
- 0.4300000071525574
- 0.4970000088214874
- 0.4909999966621399
- 0.0
- 0.5519999861717224
- 0.5509999990463257
- 0.0
- 0.9210000038146973
- 0.0
- 0.0
- 0.0
- 0.699999988079071
- '...'
intensities:
- 49.0
- 5890.0
- 49.0
- 49.0
- 48.0
- 87.0
- 1509.0
- 3279.0
- 3819.0
- 1305.0
- 2506.0
- 3994.0
- 4187.0
- 3265.0
- 317.0
- 1141.0
- 431.0
- 1263.0
- 1545.0
- 4249.0
- 918.0
- 1811.0
- 46.0
- 2475.0
- 112.0
- 40.0
- 106.0
- 6847.0
- 108.0
- 53.0
- 1880.0
- 4956.0
- 4520.0
- 764.0
- 2983.0
- 4766.0
edit retag flag offensive close merge delete

Comments

Are you setting the RVIZ visualization frame to "laser"?

JackB gravatar image JackB  ( 2020-09-22 22:22:18 -0500 )edit

What is Visualization frame? The frame id in the msg is set to laser but i'm not sure about the Rviz part.

jerry_dong gravatar image jerry_dong  ( 2020-09-22 22:28:44 -0500 )edit

Under :"Global Options" there should be a "Fixed Frame" parameter. Make sure this parameter is set to laser.

JackB gravatar image JackB  ( 2020-09-22 22:35:30 -0500 )edit

I can't change it to laser, so I tried to created a static tf called laser, and it didn't work. Besides that, I can't monitor /scan through rqt too.

jerry_dong gravatar image jerry_dong  ( 2020-09-22 22:45:00 -0500 )edit

ah, I think I was trapped in a stupid issue...... I changed the reliable selection to 'best effort' and the data showed up, looks like my desktop is too messy so it thinks all the points are not reliable I guess....

jerry_dong gravatar image jerry_dong  ( 2020-09-22 22:48:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-09-22 22:48:45 -0500

jerry_dong gravatar image

ah, I think I was trapped in a stupid issue...... I changed the reliable selection to 'best effort' and the data showed up, looks like my desktop is too messy so it thinks all the points are not reliable I guess....

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-09-22 18:49:19 -0500

Seen: 759 times

Last updated: Sep 22 '20