0
$\begingroup$

Rosanswers logo

Doing the tutorials everything was fine until half way tutorial 5: Understanding Nodes part 1.6. At the step of using this command: $ rosrun turtlesim turtlesim_node __name:=my_turtle The name wasn't changed to "my_turtle", but as insisted by the tutorial this could happen because something going on with the rosnetworksetup so I did the following:

$ export ROS_HOSTNAME=localhost $ export ROS_MASTER_URI=http://localhost:11311

Now it doesnt work at all anymore and it gives the error: unable to communicate with master! leave alone that I can change the name of turtlesim_node.

What can I do about it to fix this, or at least undo what I did?! And what exactly should I fill in for "localhost" and "http://localhost:11311" and where can I find these things?

Many thanks!


Originally posted by artifmed on ROS Answers with karma: 1 on 2012-09-17

Post score: 0


Original comments

Comment by jdlangs on 2012-09-17:
Did you start a new roscore in the shell where you set the master to localhost?

Comment by artifmed on 2012-09-17:
what exactly do you mean with the shell? yess I tried the code roscore again after setting the master to localhost, but my question is very newbie: what should I fill in for "localhost" and "http://localhost:11311" literally, and where can i find this information

Comment by jdlangs on 2012-09-17:
"localhost" is what should be there. Linux knows it means "this" computer. And a new shell is created every time a new terminal window is opened. You can set the environment variables at the end of the .bashrc file in your home folder, as prasanna said and they will be there for every new shell.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Try setting the environmental variables in the main .bashrc file. (If you use the $ export command it will be modified only for that particular terminal tab and also you will have repeat each and every time). Enter

export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311

as last two lines in the .bashrc and do . .bashrc on a terminal. Then open a new terminal and run roscore on a terminal tab and rosrun turtlesim turtlesim_node __name:=my_turtle on another. Now it should definitely work. Hope this helps!


Originally posted by prasanna.kumar with karma: 1363 on 2012-09-17

This answer was ACCEPTED on the original site

Post score: 5

$\endgroup$
0
$\begingroup$

Rosanswers logo

Also take a look at this: http://www.ros.org/wiki/ROS/NetworkSetup


Originally posted by michikarg with karma: 2108 on 2012-09-17

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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