ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

hector slam not work in a network

asked 2018-02-09 19:28:22 -0600

elgarbe gravatar image

updated 2018-02-10 14:51:16 -0600

I have a raspberry Pi 2 with ubuntu mate and ROS Kinetic. I have a hokuyo lidar connected to it. I launch hokuyo driver, then launch hector slam and I get the map on rviz. Pi is a wifi AP with the IP

Then I connect my laptop to PI AP and get IP I config my hosts with the hostname and IP (laptop hostname and IP on pi's hosts file and pi hostname and IP on laptop's hosts file). Then I run

export ROS_IP=

and launch hector slam in my laptop. I get several

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

and one

[ WARN] [1518225097.231782411]: No transform between frames /map and scanmatcher_frame available after 20.003299 seconds of waiting. This warning only prints once.

In rviz I get Global Status Error

Fixed Frame [map] does not exist

I run

rosrun rqt_tf_tree rqt_tf_tree

and see that there is a base_link -> laser tf, but there is not a map -> base_link tf and there is not map ->scanmatcher_frame tf (if I run rqt_tf_tree on Raspberry PI I can see those 3 tf). So running hector slam from another PC seems to not work ok.

But, thas is not all. If I reconfigure my network and use an external router (my home router, connected to internet) letting my PI and my laptop connected to the router, then reconfigure hosts, and master_uri, I get hector slam working on my laptop.

But, yesterday I take my router, go to the place where I need to map (out of my hosue) and again, it did not work.

So it is killing my head. I need that rasp Pi could run lidar node, then connect with my laptop and run hector slam to see the map.



I test netcat in both directions and I can get send a receive msg.

I can run

rostopic echo /scan

and see laser scan msg

but I get

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

on my laptop.

I run roswtf and get

Loaded plugin tf.tfwtf
No package or stack in context
Static checks summary:

Found 1 error(s).

ERROR Not all paths in ROS_PACKAGE_PATH [/home/elgarbe/catkin_ws/src/camera_umd/camera_umd:/home/elgarbe/catkin_ws/src/gscam:/home/elgarbe/catkin_ws/src/hector_slam/hector_imu_attitude_to_tf:/home/elgarbe/catkin_ws/src/hector_slam/hector_imu_tools:/home/elgarbe/catkin_ws/src/hector_slam/hector_map_tools:/home/elgarbe/catkin_ws/src/hector_slam/hector_compressed_map_transport:/home/elgarbe/catkin_ws/src/hector_slam/hector_mapping:/home/elgarbe/catkin_ws/src/hector_slam/hector_marker_drawing:/home/elgarbe/catkin_ws/src/hector_slam/hector_nav_msgs:/home/elgarbe/catkin_ws/src/hector_slam/hector_geotiff:/home/elgarbe/catkin_ws/src/hector_slam/hector_geotiff_plugins:/home/elgarbe/catkin_ws/src/hector_slam/hector_map_server:/home/elgarbe/catkin_ws/src/hector_slam/hector_slam:/home/elgarbe/catkin_ws/src/hector_slam/hector_slam_launch:/home/elgarbe/catkin_ws/src/hector_slam/hector_trajectory_server:/home/elgarbe/catkin_ws/src/camera_umd/jpeg_streamer:/home/elgarbe/catkin_ws/src/laser_proc:/home/elgarbe ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-10 17:39:33 -0600

elgarbe gravatar image

Ok, problem solved, it was a date/time problem between raspberry pi and my laptop. When I use my router, both sinchronize with internet and so it work. Then, when I setup raspberri pi as AP, reboot and connect my laptop to PI, raspberry has an old date/time, and so don't work.

The answer was right there all of the time: chapter 5

edit flag offensive delete link more

Question Tools



Asked: 2018-02-09 19:28:22 -0600

Seen: 620 times

Last updated: Feb 10 '18