Ask Your Question
0

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

asked 2019-01-24 11:44:41 -0500

Przemek Dyszczyk gravatar image

updated 2019-01-24 13:35:48 -0500

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 "base_link" RVIZ is dropping all messages from /scan (laser) and there is TF error in RVIZ LidarLaserScan status: Transform [sender=unknown_publisher] 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 catkin_make_isolated.

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

edit retag flag offensive close merge delete

Comments

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

gvdhoorn gravatar imagegvdhoorn ( 2019-01-24 13:11:50 -0500 )edit

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

Przemek Dyszczyk gravatar imagePrzemek Dyszczyk ( 2019-02-07 09:46:23 -0500 )edit

Why do you do this:

Laptop:

rosrun rviz rviz /tf_static:=/tf
gvdhoorn gravatar imagegvdhoorn ( 2019-02-07 10:32:14 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-07 04:45:15 -0500

Eilley gravatar image

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

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: 2019-01-24 11:43:34 -0500

Seen: 250 times

Last updated: Jan 24