Rosanswers logo

Hello to everyone :)

I want to build up a little car and on its top there should be a RPLIDAR A1 which is connected to a Raspberry Pi 3. After scanning the room I want to visualize everything with Rviz on my Laptop. So my plan is to start Rplidar on my raspberry pi and than I want to start hector slam on my laptop. Im using ROS kinetic and ubiquity on my raspberry pi. On my laptop im using ubuntu 16.04.

I have correctly networked the laptop and the raspberry pi 3. The laptop (MASTER) is for viewing and processing the Scan and also receiving the data from the Raspberry/Rplidar. I'm able to view the data on my MASTER laptop, using Rviz. I'm then running the hector_slam package on my MASTER, with the following mapping_default.launch file---

(the actual launch file)


When i launch rplidar, Rviz opens and i can see the Scan on the map. Than than i type "rosrun tf static_transform_publisher 0 0 0 0 0 0 map scanmatcher_frame 10". I did this because I was getting the warning "No transform between frames /map and scanmatcher_frame available after 20.002338 seconds of waiting. This warning only prints once.". Then i launch hector slam and another Rviz opens with an empty map and the terminal shows the following message:

[ INFO] [1576537404.723676302]: lookupTransform base_frame to laser timed out. Could not transform laser scan into base_frame.

When I'm running the same package on my Laptop with the RPLIDAR, I'm able to successfully view the map from my MASTER using Rviz. Why isn't it working the other way around?

Also i can see that the Master (Laptop/Listener) receives Messages from the slave (Raspberry Pi/talker).

I'm quite new into ROS and hope that someone could help me Thank you!

Originally posted by pmt2019 on ROS Answers with karma: 21 on 2019-12-16

Post score: 1

Original comments

Comment by ermanas on 2019-12-17:
can you share your tf tree for both of these scenarios. You can simply look at with using this command:

rosrun tf view_frames

Comment by billy on 2019-12-17:
Maybe on the laptop your launch file includes the TF publisher and on the RPi is doesn't? Or that the RPi doesn't have the publisher node installed but your launch file tries to open it on RPi?

Comment by pmt2019 on 2019-12-17:
Thank you for your quick responses guys,


Ok now I transfered my tf tree into google-drive so i’m able to share the link with you:


Comment by pmt2019 on 2019-12-17:

Do i have to use the same TF publisher command in both launch.files (on my Laptop and my raspberry pi)? If yes, which TF publisher ("static_transform_publisher"?) commands do i have to copy?

Here are the active nodes when i run my system:

Raspberry Pi: ubuntu@ubiquityrobot:~$ rosnode list

/controller_spawner /joint_state_publisher /joy_node /motor_node /robot_state_publisher /rosbridge_ws/rosapi /rosbridge_ws/rosbridge_websocket /rosbridge_wss/rosapi /rosbridge_wss/rosbridge_websocket /rosout /teleop_twist_joy /tf2_web_republisher

Laptop:~$ rosnode list

/base_to_laser_broadcaster /hector_geotiff_node /hector_mapping /hector_trajectory_server /listener_23508_1576622227974 /map_nav_broadcaster /map_scanmatcher_broadcaster /nav_basefootprint_broadcaster /nav_baseframe_broadcaster /nav_baselink_broadcaster /rosout /rplidarNode /rviz /static_transform_publisher_1576622692801770813 /static_transform_publisher_1576622735323857703 /talker_1727_145520

Comment by ermanas on 2019-12-18:
Hello again, As you can see there is no transform from the laser to the base_frame. Is this tree the same when you can see the map from the laptop? If you check the hector_slam ros wiki. You'll see the links on the robot. I also applied hector slam with just a 2D laser as well. I only used base_link to accomplish. My tf is like this: https://ibb.co/qR19jg6

Comment by pmt2019 on 2019-12-18:
Hi. Today i rebuilt my system completely. I also tried just to use base_link like you did. So when i connect the Rplidar directly with my laptop i also get the same tf like you: https://drive.google.com/file/d/1g0nKa73DaiFFtHhL8nY0NkiHARgQu7Ha/view?usp=sharing

But when i connect the Rplidar with the Raspberry Pi and start everything from my laptop (remote control) i will get this tf with no connection between base_link and map. And also there appears base_footprint: https://drive.google.com/file/d/1a1Z3A4P1I4BGwyImlT3Q0dHbVMmbkSq5/view

I just changed the launch file like in this explanation link: (at the end of the site) https://github.com/NickL77/RPLidar_Hector_SLAM

My Order:

  • start roscore on my laptop
  • tell raspi that laptop is the master (export ROS_MASTER_URI=)
  • define my raspi as a talker and laptop as listener (rosrun rospy_tutorials talker.py)
  • start Rplidar
  • start hector slam

Did i miss something or are there differences to the launch file you did?

Comment by ermanas on 2019-12-19:
First, because of the reputation problem, you can tell your problem better in the ROS discord channel. ROS Discord Channel Invitation Link

I couldn't find the problem but in the code on your question(if you didn't change completely), you wrote arguments first and I guess you tried to assign the parameter with these arguments when you're defining base_frame and odom_frame . But in your case, you assign the argument with this:

 <arg name="base_frame" default="base_link"/>

Then you didn't use it and you've just assigned as a base_frame

But it doesn't assign the argument to the parameter. If you want to do this parametric, you can do like this:

 <param name="base_frame" value="$(arg base_frame)" />

Comment by pmt2019 on 2019-12-19:
In catkin_ws/src/rplidar_hector_slam/hector_slam/hector_mapping/launch/mapping_default.launch:

  1. replace the second last line with

  2. the third line with

  3. the fourth line with

I just changed the original data in the above three points. I refreshed my launch file in my first question! But if i understand it right you also used a Lidar with a Pi and a laptop and everything worked? Did you have another launch file than me?

Thank you for the invitation!

Could it possible be that i have the same problem like: https://answers.ros.org/question/234365/hector_slam-not-working-with-my-bag-file/?answer=234368?answer=234368#post-id-234368 ? I have the problem that i cannot install this bag file because i get: ERROR 404: Not found.

I don't get it...


1 Answer 1


Rosanswers logo

Finally i have the solution. It was a time issue and i had to synchronize the Pi and my laptop. I did it with point 5 of the following link: https://wiki.ros.org/ROS/NetworkSetup

Anyway a big thank you to you guys for your help!

Originally posted by pmt2019 with karma: 21 on 2019-12-19

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by ermanas on 2019-12-20:
Good to hear that you found the solution. Good luck on your project. I will also check the Network setup for my project.

PS: I was using industrial safety scanner and a single-board PC but not RP and rplidar. But the concept is the same,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.