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

cmd_vel topic from navigation stage not sending to raspberry robot

asked 2018-04-22 18:16:59 -0500

bjurek5 gravatar image

Hello I have some problem with navigation stage module. I have a robot with raspberry pi and hokuyo lidar mount on it and base station for mapping calculation. The standard way to run the ROS on two machine is: 1. start roscore 2. start scan streaming 3. start reading cmd_vel on robot 4. start tf publisher 5. start rf2o 6. start hector_slam 7. start navigation_stage 8. start frontier_exploration And my problem is when I try to set 2d Nav point somewhere in the room and in the same team run echo on cmd_vel topic I can see that navigation stage is publishing some velocity data. But when I run cmd_vel echo on RPi there is no data. The more interesting thing is that I wrote my manual control topic which is publishing to cmd_vel and this is working correctly and robot is moving. It seems that for some reason when running navigation_stage data is only visible on local PC and not on RPi. Can you help finding solution for that problem ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-04-23 03:02:17 -0500

Delb gravatar image

As @Rodolfo8 said it's probably a networking configuration problem. You have to make sure you've correctly configured the ROS_MASTER_URI variable from your PC and Raspberry. Try echo $ROS_MASTER_URI from your PC and from the Raspberry. Do it from every terminal you are using to be sure they all share the same master.

Another thing is that by default you should have ROS_MASTER_URI=http://localhost:11311/ or something similar, but you should change it to http://192.168.1.XX:11311/ (the IP adress of the raspberry or the PC) and then run export ROS_MASTER_URI=http://192.168.1.XX:11311/ from all your terminals.

Finally, you should also set the variable ROS_HOSTNAME to the corresponding IP adress.

edit flag offensive delete link more

Comments

set the variable ROS_HOSTNAME to the corresponding IP adress.

I'd recommend sticking to hostnames for ROS_HOSTNAME, and use ROS_IP for IPs.

The former can exploit the flexibility that DNS provides (but you need a working DNS).

gvdhoorn gravatar image gvdhoorn  ( 2018-04-23 03:32:58 -0500 )edit

I will check in afternoon where I have configured IP's and where not. Does the console running roscore also need to have configured ROS_MASTER_URI before ?

bjurek5 gravatar image bjurek5  ( 2018-04-23 04:32:41 -0500 )edit

Yes, every console must have the same ROS_MASTER_URI

Delb gravatar image Delb  ( 2018-04-23 04:33:46 -0500 )edit

I added on host PC export ROS_MASTER_URI to .bashrc file, and the second thing where I had problem earlier was to have in virtualbox configuration only one bridged network card, for some reason I had two activated, after disabling everything runs well, thanks for support

bjurek5 gravatar image bjurek5  ( 2018-05-07 14:55:36 -0500 )edit
0

answered 2018-04-22 22:28:34 -0500

updated 2018-04-23 05:11:11 -0500

Are the other topics properly published between the two machines, visible on both? If not, this points to a networking configuration problem. Or it could be a capitalization problem, like you typed, Cmd_vel, or /cmd_vel, or cmd-vel.

edit flag offensive delete link more

Comments

Data from Hokuyo Lidar is correctly published from RPi to PC. Cmd_vel subscriber on RPi works for now only with my manual control node on pc

bjurek5 gravatar image bjurek5  ( 2018-04-23 04:28:54 -0500 )edit

Question Tools

Stats

Asked: 2018-04-22 18:16:59 -0500

Seen: 313 times

Last updated: Apr 23 '18