0
$\begingroup$

Rosanswers logo

Hi,

I'm using ROS Kinetic on a virtualbox running Ubuntu 16.04.

When I run the bringup packages there are no errors and the turtlebot3_robot.launch says that it has set up the subscriber for the /cmd_vel topic from geometry_msgs.msgs/Twist.

When I go back to my Remote PC and run turtlebot3_teleop_key, data is published to /cmd_vel according to echo rostopic /cmd_vel. However, the robot does not move. When I run rqt_graph, it does not show a subscriber for /cmd_vel.

So I have conflicting information, with both parts (publisher and subscriber) claiming they're doing their job, but the robot is unable to move.

I'm new to ROS and TurtleBot operation so I apologize if this is a simple fix but I can't find a solution.


Originally posted by boggsje on ROS Answers with karma: 3 on 2018-07-16

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You need to connect your virtual machine and the other computer as ROS master/slave.

Here is ROS wiki about master/slave and networking. And here is a tutorial that is a bit more straight forward to follow.

Basically what you need to do is (change the ip's to the ip's of your setup):

  1. Choose which computer will be master (Running roscore, doing calculations that are more time-critical)
  2. On the slave machine ping the master
  3. Set the slave pc ROS_MASTER_URI to the ip you pinged ($ ` export ROS_MASTER_URI=http://192.168.0.4:11311`) 4. Set the slave pc ROS_IP to the ip of the slave ($ export ROS_IP=192.168.0.5)

To verify that you have ROS connected on the two computers:

  1. Start roscore on the master $ `roscore` 2. On the slave PC $ printenv | grep ROS to verify the before-mentioned variables are set correctly
  2. On the slave PC ($ rostopic list )

If everything works as expected you should see the /rosout and /rosout_agg topics listed on the slave terminal. You could now run your launch files in these terminals and it should work. With this setup you have to set the variables for each terminal you want to communicate with the master. If this is not to your liking read the links posted above.


Originally posted by Reamees with karma: 591 on 2018-07-17

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by boggsje on 2018-07-17:
Great thanks that worked, although I did have several problems with hostnames. Thanks for your help.

$\endgroup$

Your Answer

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