Robotics StackExchange | Archived questions

How to make laser data visible on all Fixed Frames in RVIZ?

I have problem with ydlidar laser visualization in RVIZ. I am using rosdistro: kinetic on Raspberry Pi 3+ as main computer (run launcher file) and my laptop (to run RVIZ). In RVIZ I can see laser data in "Fixed Frame -> laser". If I change "Fixed Frame" to "baselink" RVIZ is dropping all messages from /scan (laser) and there is TF error in RVIZ LidarLaserScan status: Transform [sender=unknownpublisher] Unknown reason for transform failure

How I was trying to fix that:

1. ntpdate to synchronise both systems
2. change frequency of TF publisher to 10, 50, 100, 500, 1000 but it did not help. 
3. There is no errors in 'roswtf'

I kindly ask for your help to solve that problem.

Running:

Raspberry:
roslaunch linorobot lidar.launch

Laptop:
rosrun rviz rviz /tf_static:=/tf

Systems:

Raspberry Pi 3+, Raspian (launch file), Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

Laptop, Ubuntu 16.04 (RVIZ), Linux user 4.4.0-81-generic #104-Ubuntu SMP Wed Jun 14 08:17:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

On both systems ROS was installed from source by catkinmakeisolated.

Packeges: ydlidar https://github.com/EAIBOT/ydlidar.git

Ros param:

Raspberry (main):
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_MASTER_URI=http://10.1.1.225:11311
ROS_VERSION=1
ROS_IP=10.1.1.225
ROS_PACKAGE_PATH=/root/linorobot_ws/src:/opt/ros/kinetic/share
ROSLISP_PACKAGE_DIRECTORIES=/root/linorobot_ws/devel/share/common-lisp
ROS_DISTRO=kinetic

Laptop (RVIZ):
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/user/linorobot_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://10.1.1.225:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=/home/user/linorobot_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_IP=10.1.1.40
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

Ogre.log

rviz -l
[ INFO] [1548349571.364933383]: rviz version 1.12.16
[ INFO] [1548349571.365039107]: compiled against Qt version 5.5.1
[ INFO] [1548349571.365060586]: compiled against OGRE version 1.9.0 (Ghadamon)

Launch file:

<node pkg="tf" type="static_transform_publisher" name="base_link_to_laser" 
  args="0 0 0 0 0 0 /base_link /laser 100" />  

<node name="ydlidar_node"  pkg="ydlidar"  type="ydlidar_node" output="screen">
  <param name="port"         type="string" value="/dev/linolidar"/>  
  <param name="baudrate"     type="int"    value="230400"/>
  <param name="frame_id"     type="string" value="laser"/>
  <param name="angle_fixed"  type="bool"   value="true"/>
  <param name="low_exposure"  type="bool"   value="false"/>
  <param name="heartbeat"    type="bool"   value="false"/>
  <param name="resolution_fixed"    type="bool"   value="true"/>
  <param name="angle_min"    type="double" value="-180" />
  <param name="angle_max"    type="double" value="180" />

  <param name="range_min"    type="double" value="0.08" />
  <param name="range_max"    type="double" value="16.0" />
  <param name="ignore_array" type="string" value="" />

  <param name="samp_rate"    type="int"    value="11"/>
  <param name="frequency"    type="double" value="12"/>
</node>

Screens:

RVIZ /laser frame: image description

RVIZ /base_link frame: image description

TF tree: image description

Asked by Przemek Dyszczyk on 2019-01-24 12:43:34 UTC

Comments

Can you please attach your screenshots and tf tree to this post? I've given you sufficient karma for that.

Asked by gvdhoorn on 2019-01-24 14:11:50 UTC

Nobody can help? Or at least tell what could be wrong?

Asked by Przemek Dyszczyk on 2019-02-07 10:46:23 UTC

Why do you do this:

Laptop:

rosrun rviz rviz /tf_static:=/tf

Asked by gvdhoorn on 2019-02-07 11:32:14 UTC

Answers

Hey! Hope my answer could help! 1、git clone https://github.com/YDLIDAR/ydlidar 2、the baud rate of X4 should be set up as 12800 in the lidar.launch file

Asked by Eilley on 2019-05-07 04:45:15 UTC

Comments