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

Export ROS_MASTER_URI error in win_ros

asked 2016-11-29 06:27:51 -0500

anflores gravatar image

Hi all,

I am getting a little bit crazy with his problem. I installed win_ros hydro in windows 7, and I am trying to run a simple talker from a Visual studio 2012 professional project. I followed the instructions, but I always get an exception saying that ROS_MASTER_URI is not defined in my enviroment. I saw that this issue was already solved in this thread, by defining the ROS_MASTER_URI in the debug enviroment. However, I tried this a hundred times, adding different lines:

ROS_MASTER_URI = http://localhost:11311

ROS_MASTER_URI = http://127.0.0.1:11311

ROS_MASTER_URI = http://andres-PC:11311

nothing works. I also tried with VS2010 professional, but nothing. Could it be the version of the VS?. The exception always appears with the ROS_MASTER_URI undefined. It must be some stupid thing that I am missing, and I am not able to fix. I have to mention that I didn't defined the ROS_MASTER_URI globally in my system, due to I don't know how on windows. In the tutorial of win_ros, the hyperlink to explain how to do this is broken.

I cannot find more information about this problem, so any experienced help will be really appreciated.

Thank you in advance!

edit retag flag offensive close merge delete

Comments

Any help please? It is related with the enviroment variables in windows, that I guess I am not defining them properly. Thanks

anflores gravatar image anflores  ( 2016-12-01 16:13:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-12-02 01:06:35 -0500

gvdhoorn gravatar image

updated 2016-12-02 01:06:52 -0500

I'm not sure this is actually the solution to your problem, but the general procedure to add/remove/edit environment variables on Windows 7 is:

  1. From the desktop, right click the Computer icon.
  2. Choose Properties from the context menu.
  3. Click the Advanced system settings link.
  4. Click Environment Variables
  5. In the Edit System Variable (or New System Variable) window, specify the value of the environment variable.
  6. Click OK. Close all remaining windows by clicking OK.

If you have a restricted user account (or anything not with administrator level access), you might not be able to do this. For those accounts, go to the User Accounts applet in the Control Panel, and click the Change my environment variables link at the bottom of the list in the left side of the window (see this link fi).

To avoid issues with DNS, use only IPs when setting ROS_MASTER_URI. If you intend to have your Windows ROS nodes communicate with other machines, I'd also set ROS_IP to the IP of the Windows machine.

edit flag offensive delete link more

Comments

Hi! thank you for your answer. The thing is that I tried your proposal, adding the ROS_MASTER_URI to the enviroment variable, but it didn't work. I think I have to define it in the Visual Studio enviroment variable while debugging, but I tried many times and I still get the error. I don't know...

anflores gravatar image anflores  ( 2016-12-02 17:34:05 -0500 )edit

Hey, I just discovered that I worked!! I just defined a new enviroment variable ROS_URI_MASTER with value http://andres-PC:11311 . Thank you very much! I was really stacked

anflores gravatar image anflores  ( 2016-12-02 19:07:16 -0500 )edit

I assume you mean ROS_MASTER_URI, right? Also: if you have any other PCs in your ROS netwerk, using IPs might be more robust.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-03 05:04:32 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-11-29 06:27:51 -0500

Seen: 964 times

Last updated: Dec 02 '16