0
$\begingroup$

Rosanswers logo

Hello, I am pretty new at ROS and I have to work on Odroid for my project. ROS is installed on my Odroid and it was working sort of fine until I wanted to create SSH connection with the computer. I want to attach the odroid on a robot and run the command from my computer.

But at the moment, even while the Odroid is not attached to the robot, I can´t run roscore on it. It gives me the following error:

Unable to contact my own server at [http://192.168.1.105:44827/]
This usually means that the network is not configured properly.
A common cause is that th machine cannot ping itself. Please check for errors by running:
ping 192.168.1.105

On my odriod when I type hostname -I to learn the IP it gives me:

192.168.1.225

when I check the bashrc file on odroid it says

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

Meanwhile on my main computer that I want to give the command, the result for hostname -I

10.1.214.229

The bashrc file:

export ROS_MASTER_URI=http://192.168.1.105:11311/
export ROS_HOSTNAME=192.168.1.21

I want to find solution firstly why I can not run roscore on my odroid and then where do i do wrong with my IP setting?

Thank you for your answers in advance!


Originally posted by firuze on ROS Answers with karma: 13 on 2018-08-24

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

192.168.1.105 is not the IP of your Odroid (any more).

It could have been earlier, but according to your hostname -I output, it is now 192.168.1.225.

You're setting ROS_HOSTNAME=192.168.1.105, which makes roscore try and use that to connect to "its own server". This will obviously fail.

Try to set ROS_HOSTNAME to 192.168.1.225. Save .bashrc, open a new terminal and try again.

Note: using ROS_HOSTNAME like this is actually why things are failing for you. You can avoid this by configuring a static IP for your Odroid (either locally on the device itself, or by making a DHCP "reservation" in your router).

The better alternative would be to make sure you have a working DNS on your network.

That would allow you to use hostnames instead of IP addresses. The IP addresses can then change, but the hostnames stay the same.

A middleground could be to use /etc/hosts: you configure the mapping IP<->hostname there manually. You'd still be responsible for keeping that file up-to-date though.

A third alternative could be to use Avahi to do name resolution for you. See wiki/ROS/NetworkSetup: Name resolution - Using machinename.local on the ROS wiki for some more info on that.

And make sure to check the wiki/ROS/NetworkSetup page for more general info about how to configure your network correctly.


Originally posted by gvdhoorn with karma: 86574 on 2018-08-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2018-08-24:
Edit: I should have closed this as a duplicate. There are quite a few older questions about this. Using Google I get these results fi.

Comment by firuze on 2018-08-24:
I checked similar questions but couldn´t solve my problem from given answers.. thank you for not closing it

$\endgroup$

Your Answer

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