1
$\begingroup$

I've recently tried to get the remote ros node on mobile robot through wifi. This is as below picture.

Laptop and Mobile robot connection

I've run roscore command on both laptop and mobile robot and when running the roscore command I've got the following warning message on my laptop server

WARNING: ROS_MASTER_URI [http://192.168.7.2:11311] host is not set to this machine

auto starting new master
process[master]: started with pid[2719]
ROS_MASTER_URI=http://192.168.7.2:11311/

setting /run_id to 4ef6c0f8-bfdf-11d3-a450-4e699f75a6e7
process[rosout-1]:started with pid[2732]
started core service[/rosout]

but when run rosparam list command on laptop as below I've got the following results

root@duminda-laptop:~#rosparam list
/rosdistro
/roslaunch/uris/host_192_168_7_2_35078
/rosversion
/run_id
root@duminda-laptop:~#rosparam get /rosdistro
hydro
root@duminda-laptop:~#rosparam get /roslaunch/uris/host_192_168_7_2_35078
http://192.168.7.2:35078
root@duminda-laptop:~#rosparam get /run_id
4ef6c0f8-bfdf-11d3-a450-4e699f75a6e7

These results shows that both laptop and mobile robot connected ok .

  • Is my setup to receiving the mobile robots data to my laptop is ok?
  • Why there is a warning message like above when starting the roscore?
$\endgroup$
2
$\begingroup$

You only need one roscore. It should be run by the "host," which is the mobile robot, if I understand correctly. Then you can connect to it with your laptop.

Following this tutorial with the "talker" being your mobile robot and the "listener" being your laptop:

  1. Start the roscore on the host (mobile robot).
    $ roscore
  2. Configure ROS_MASTER_URI on the host (mobile robot).
    $ export ROS_MASTER_URI=http://192.168.7.1:11311
  3. Now, do that same step on your laptop.
    $ export ROS_MASTER_URI=http://192.168.7.1:11311

I've personally tried using hostnames, but sometimes it can't resolve it, so I've stuck to using the complete address.

$\endgroup$
  • $\begingroup$ This is good . I'll try this. $\endgroup$ – kaviranga Jun 8 '17 at 7:03
1
$\begingroup$

This is how I make changes to my robot according to the book "Mastering ROS for Robotics Programming"

configuring mobile robot as ROS master

#setting LAPTOP_IP as mobile robot's ip
export LAPTOP_IP=192.168.7.2

#setting ROS_IP variable as laptop's ip
export ROS_IP=$LAPTOP_IP

#setting ROS_MASTER_URI as mobile robot's_ip
export ROS_MASTER_URI=http://192.168.7.2:11311

configuring laptop as ROS computing node

#setting LAPTOP_IP as laptop's ip
export LAPTOP_IP=192.168.7.1

#setting ROS_IP variable as laptop's ip
export ROS_IP=$LAPTOP_IP

#setting ROS_MASTER_URI as mobile robot's_ip
export ROS_MASTER_URI=http://192.168.7.2:11311

Also I've first tried this with different ros versions,ROS groovy on mobile robot and ROS indigo on my laptop . So as a result of that there was an error occurred described as in my question and in this attempt I've tried this configuration in both laptop and in the mobile robot using same ROS indigo versions. Hope this will help to others.

Update 2017.08.28

Finally I've experimented that it is ok with using two versions of ROS for this . Using ROS groovy for mobile robot and ROS indigo for our pc/laptop . The ROS master and ROS computing node ip configurations must be properly set as mentioned above in this answer.

$\endgroup$
0
$\begingroup$

From Configuration of computer A and computer B on nubot-nudt/gazebo_visual:

Configuration of computer A and computer B

configuration

Computer A runs one ROS node called N1 (i.e. Gazebo in the figure above) along with roscore. Computer B runs another ROS node called N2 (i.e. Coach 1 and Robot team 1 can be treated as one combined node in the figure above).

The communication between computer A and computer B is via ROS master. The following is the configuration steps:

  1. In computer A, add computer B's IP address in /etc/hosts; and in computer B, add computer A's IP address in /etc/hosts e.g. In computer A, $ sudo gedit /etc/hosts and add "Maggie 192.168.8.100" In computer B, $ sudo gedit /etc/hosts and add "Bart 192.168.8.101"
  2. In computer A, run node N1; In computer B, before you run node N2, you should export ROS_MASTER_URI. e.g. In computer B, $ export ROS_MASTER_URI=http://Bart:11311
$\endgroup$
  • $\begingroup$ @MarkBooth Thank you for your comment. I have modified my answer to be more specific. $\endgroup$ – winston Jun 10 '17 at 3:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.