Ask Your Question
0

Using hokuyo node in a remote computer while HectorSlam in master

asked 2015-07-22 09:27:15 -0600

Victor Gomez gravatar image

Good day fellow members, I have the following problem:

I'm using two computers, a laptop and a raspberry pi2. Both are running Ubuntu 14.04 and ROS Indigo. My laptop is my master. I make sure to define the hostname and master uri to the IP in this computer. In the Rpi2 I'm defining the hostname with Rpi2's IP and the master uri with the laptop's IP. Therefore, I can run the roscore in the laptop, run hokuyo_node in the Rpi2 and rviz it in the laptop. My network is not a problem at this point that I can think of. I even use ssh for everything up to here.

In a single computer setup, I'm use __HectorSLAM__ with my own launch file. Everything works fine. The problem comes when I'm in the network setup, and I start the hokuyo node in the Rpi2. I check the rostopic list and in both setups I've got the same topics. Everything is exactly the same but the physical connection of the LRF. I receive the following error message:

lookupTransform base_link to laser timed out. Could not transform laser scan into base_frame

Therefore, I cannot SLAM. Do you have any ideas or suggestions? My sole objective is to use the Rpi2 to launch the LRF remotely, while on the laptop perform the "heavy" processing. Please all the help is much appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-07-22 21:22:24 -0600

Ed Venator gravatar image

First, verify that your topics (particularly /tf) are connected as they should be. The easiest way to do that is with rqt_graph.

If the topics are all connected properly, next check out your tf tree using tf view_frames. Make sure you have a TF from base_link to laser. If you aren't publishing that TF, you'll need to publish it with a tf static_transform_publisher or with a robot_state_publisher state_publisher and a URDF description of your robot.

Finally, if your ROS graph and TF tree are complete, then your problem is probably timing. If the system clock on the laptop isn't synced with the system clock on the RPi, then lookupTransform may fail. You can manually sync the clocks, but a better solution is to use chrony.

Further info here: http://wiki.ros.org/ROS/NetworkSetup

edit flag offensive delete link more

Comments

Thank you so much! I did as you said... at the end, the error was the simplest one. The clock sync. Thanks!

Victor Gomez gravatar imageVictor Gomez ( 2015-07-24 01:07:54 -0600 )edit
1

answered 2015-07-22 10:41:23 -0600

Could you try and do this. On the master (you can add this to the ~/.bashrc file and then source the file) define - export ROS_IP= ${your_laptop_ip} and on the RasPi define these two parameters - export ROS_IP= ${Raspi_ip} and export ROS_MASTER_URI=http://${your_laptop_ip}:11311 . You can define this in the bashrc as well. Try and see if this solves the issue. If it still gives the error you may want to look at this previous post - http://answers.ros.org/question/38402...

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: 2015-07-22 09:27:15 -0600

Seen: 319 times

Last updated: Jul 22 '15