Robotics Asked by kaviranga on January 6, 2022
I’ve recently tried to get the remote ROS node on a mobile robot through wifi. This is as below picture.
I’ve run roscore
command on both laptop and mobile robot and when I run the roscore
command, I get 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 I run rosparam list
command on my laptop, 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 show that both laptop and mobile robot connected ok.
roscore
?From Configuration of computer A and computer B on nubot-nudt/gazebo_visual:
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:
$ 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"
$ export ROS_MASTER_URI=http://Bart:11311
Answered by winston on January 6, 2022
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.
Answered by kaviranga on January 6, 2022
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:
roscore
on the host (mobile robot).$ roscore
ROS_MASTER_URI
on the host (mobile robot).$ export ROS_MASTER_URI=http://192.168.7.1:11311
$ 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.
Answered by christophebedard on January 6, 2022
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP