Vibrating point cloud in rviz.
So as you can see on the code I'm creating two subscribing nodes:
- Subscribing from laser scanner
- Subscribing /tf which is result of transformation /odom -> /robot
In this code I'm using tf2_sensor_msgs
to transform point_cloud
(which is just /mybot/laser/scan transformed into point_cloud) with do_transform_cloud()
using /tf
and publish it to topic /laserPointCloud
.
My problem is that when I'm publishing it to RVIZ i can see some kind of vibrations of the subscribed point_cloud
. I was thinking that it may be because frequency of publishing /mybot/laser/scan
is 40Hz and of the /tf
30 but I've made two separate scripts to publish pointcloud at 30Hz (to be the same as /tf using rate.sleep()
) and it didn't help (the vibrations appeared like in the given code).
Ubuntu:18.04 LTS / ROS: Melodic