tuftsBaxter / ROS-for-LabVIEW-Software

49 stars 23 forks source link

cannot connect to another computer running master #10

Closed mcevoyandy closed 7 years ago

mcevoyandy commented 7 years ago

Following the tutorial on the clear path page I cannot connect to an ubuntu laptop that's running the master. The VI continually asks for the master IP address. Any advice for trouble shooting this issue?

wcrooks commented 7 years ago

Hi Andy,

This happens because LabVIEW can't connect to the Master. Normally this is because you aren't on the same network. Are you able to ping the master from your machine?

Whitney

On Thu, Aug 31, 2017 at 4:30 PM, Andy notifications@github.com wrote:

Following the tutorial on the clear path page I cannot connect to an ubuntu laptop that's running the master. The VI continually asks for the master IP address. Any advice for trouble shooting this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJru3w2wocLubZ1lQaf10KBqTa8A_F5ks5sdxflgaJpZM4PJXix .

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

mcevoyandy commented 7 years ago

So the only thing that works is setting the master computer to "ROS_MASTER_URI=http://192.168.0.2:11311" instead of "ROS_MASTER_URI=http://localhost:11311". This way at least the topics appear when I do "rostopic list" but my messages never show up using rostopic echo even though probes on the VI show the message is being constructed and sent.

I'm using 14.04 + Kinetic and Win7 + LabView 2015 SP1 (32 bit) if that makes a difference...

wcrooks commented 7 years ago

Keeping the master URI as localhost should work - that's how my environment is set up. What are you typing into the dialog box when it appears?

On Tue, Sep 5, 2017 at 9:38 AM, Andy notifications@github.com wrote:

So the only thing that works is setting the master computer to "ROS_MASTER_URI=http://192.168.0.2:11311" instead of "ROS_MASTER_URI= http://localhost:11311". This way at least the topics appear when I do "rostopic list" but my messages never show up using rostopic echo even though probes on the VI show the message is being constructed and sent.

I'm using 14.04 and Kinetic if that makes a difference...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10#issuecomment-327177768, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJruyTZGt1GMyF2umWuyD1X6rgUg_ghks5sfU7GgaJpZM4PJXix .

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

mcevoyandy commented 7 years ago

IP of the ubuntu computer. With "localhost" I would always get error 63 showing on a probe I placed on the TCP connection box. I also didn't answer your other question, but yes, both computers can ping each other and I don't have problems connecting multiple ubuntu computers to the same master.

wcrooks commented 7 years ago

Right. Using localhost in the dialog box won't work because localhost means 'this computer' and not a specific IP address. So http://192.168.0.2:11311 should be what you're entering in the box.

Can you open ROSTerminal.vi, run that, and then send a screenshot? You can access it from the palette under ROS > ROS_Tools or from going to Program Files (x86) or Applications > National Instruments > LabVIEW 201X > user.lib > ROS for LabVIEW Software > ROS > Code > ROS_Tools.

On Tue, Sep 5, 2017 at 11:02 AM, Andy notifications@github.com wrote:

IP of the ubuntu computer. With "localhost" I would always get error 63 showing on a probe I placed on the TCP connection box. I also didn't answer your other question, but yes, both computers can ping each other and I don't have problems connecting multiple ubuntu computers to the same master.

Andy McEvoy | (832) 439 - 6150 <(832)%20439-6150>

On Tue, Sep 5, 2017 at 8:56 AM, Whitney notifications@github.com wrote:

Keeping the master URI as localhost should work - that's how my environment is set up. What are you typing into the dialog box when it appears?

On Tue, Sep 5, 2017 at 9:38 AM, Andy notifications@github.com wrote:

So the only thing that works is setting the master computer to "ROS_MASTER_URI=http://192.168.0.2:11311" instead of "ROS_MASTER_URI= http://localhost:11311". This way at least the topics appear when I do "rostopic list" but my messages never show up using rostopic echo even though probes on the VI show the message is being constructed and sent.

I'm using 14.04 and Kinetic if that makes a difference...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10# issuecomment-327177768, or mute the thread https://github.com/notifications/unsubscribe-auth/ AIJruyTZGt1GMyF2umWuyD1X6rgUg_ghks5sfU7GgaJpZM4PJXix

.

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10# issuecomment-327202068, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABSamYiuZX06ybHLmp1EVhkhf3fExImMks5sfWEegaJpZM4PJXix .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10#issuecomment-327203929, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJru7r0oq6f9ifJgUKQH_5i_qmO6WCWks5sfWKPgaJpZM4PJXix .

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

mcevoyandy commented 7 years ago

Sorry, didn't mean to say I was putting "localhost" in the popup.

I think I've made some progress though...

Are you setting "ROS_HOSTNAME=localhost" anywhere in the Labview?

My ubuntu .bashrc has the following lines set when I'm running local host: export ROS_HOSTNAME=localhost export ROS_MASTER_URI=http://localhost:11311

When I comment out "ROS_HOSTNAME" and unset it, everything seems to work as expected.

mcevoyandy commented 7 years ago

forgot to mention that I also have a script that always sets ROS_IP to my current IP address. I think ROS_HOSTNAME takes precedence over ROS_IP, which makes me wonder if Labview is also setting ROS_HOSTNAME and a conflict is occurring.

wcrooks commented 7 years ago

I think part of the problem is that you're setting both the IP address and the hostname. You should only be doing one or the other.

The other issue is with using localhost as your hostname. I was reading through some of the documentation on node environment variables http://wiki.ros.org/ROS/EnvironmentVariables#ROS_IP.2BAC8-ROS_HOSTNAME and came across this:

"If the value is set to localhost, the ROS component will bind only to the loopback interface. This will prevent remote components from being able to talk to your local component."

We aren't setting the host name anywhere in the LabVIEW code, though you can use the hostname in the dialog box that pops up (so long as it isn't localhost).

On Tue, Sep 5, 2017 at 12:13 PM, Andy notifications@github.com wrote:

forgot to mention that I also have a script that always sets ROS_IP to my current IP address. I think ROS_HOSTNAME takes precedence over ROS_IP, which makes me wonder if Labview is also setting ROS_HOSTNAME and a conflict is occurring.

Andy McEvoy | (832) 439 - 6150 <(832)%20439-6150>

On Tue, Sep 5, 2017 at 9:54 AM, Andy McEvoy mcevoy.andy@gmail.com wrote:

Sorry, didn't mean to say I was putting "localhost" in the popup.

I think I've made some progress though...

Are you setting "ROS_HOSTNAME=localhost" anywhere in the Labview?

My ubuntu .bashrc has the following lines set when I'm running local host: export ROS_HOSTNAME=localhost export ROS_MASTER_URI=http://localhost:11311

When I comment out "ROS_HOSTNAME" and unset it, everything seems to work as expected.

Andy McEvoy | (832) 439 - 6150 <(832)%20439-6150> <(832)%20439-6150>

On Tue, Sep 5, 2017 at 9:12 AM, Whitney notifications@github.com wrote:

Right. Using localhost in the dialog box won't work because localhost means 'this computer' and not a specific IP address. So http://192.168.0.2:11311 should be what you're entering in the box.

Can you open ROSTerminal.vi, run that, and then send a screenshot? You can access it from the palette under ROS > ROS_Tools or from going to Program Files (x86) or Applications > National Instruments > LabVIEW 201X > user.lib > ROS for LabVIEW Software > ROS > Code > ROS_Tools.

On Tue, Sep 5, 2017 at 11:02 AM, Andy notifications@github.com wrote:

IP of the ubuntu computer. With "localhost" I would always get error 63 showing on a probe I placed on the TCP connection box. I also didn't answer your other question, but yes, both computers can ping each other and I don't have problems connecting multiple ubuntu computers to the same master.

Andy McEvoy | (832) 439 - 6150 <(832)%20439-6150> <(832)%20439-6150> <(832)%20439-6150>

On Tue, Sep 5, 2017 at 8:56 AM, Whitney notifications@github.com wrote:

Keeping the master URI as localhost should work - that's how my environment is set up. What are you typing into the dialog box when it appears?

On Tue, Sep 5, 2017 at 9:38 AM, Andy notifications@github.com wrote:

So the only thing that works is setting the master computer to "ROS_MASTER_URI=http://192.168.0.2:11311" instead of "ROS_MASTER_URI= http://localhost:11311". This way at least the topics appear when I do "rostopic list" but my messages never show up using rostopic echo even though probes on the VI show the message is being constructed and sent.

I'm using 14.04 and Kinetic if that makes a difference...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW- Software/issues/10# issuecomment-327177768, or mute the thread https://github.com/notifications/unsubscribe-auth/ AIJruyTZGt1GMyF2umWuyD1X6rgUg_ghks5sfU7GgaJpZM4PJXix

.

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10# issuecomment-327202068, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABSamYiuZX06ybHLmp1EVhkhf3fExImMks5sfWEegaJpZM4PJXix .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/ issues/10#issuecomment-327203929, or mute the thread https://github.com/notifications/unsubscribe-auth/ AIJru7r0oq6f9ifJgUKQH_5i_qmO6WCWks5sfWKPgaJpZM4PJXix

.

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10# issuecomment-327207120, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABSamaVtszrgNEZezyy3UwC0cvC4mCbOks5sfWTugaJpZM4PJXix .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tuftsBaxter/ROS-for-LabVIEW-Software/issues/10#issuecomment-327226233, or mute the thread https://github.com/notifications/unsubscribe-auth/AIJru-eZQKyj1cOz3GEPb2K5ztwz91P-ks5sfXM_gaJpZM4PJXix .

-- Whitney Crooks Ph.D. in Mechanical Engineering - Tufts University STEM Leaders Fellow IGERT Soft Material Robotics Associate Research Assistant at the Center for Engineering Education and Outreach

mcevoyandy commented 7 years ago

Thanks, this makes sense. Everything is working as expected now. Thanks for all your help.