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

how to connect to ros master running on rasberry pi

asked 2021-08-07 23:12:46 -0500

bribri123 gravatar image

I have a desktop computer running ros noetic on ubuntu 20.04 and a rasberry pi with the same setup, they are both connected to the same wifi

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-08-09 15:42:14 -0500

dave gravatar image

Hi there,

In the most simple setup, you need to tell the Raspberry Pi that it is the ROS master and also to tell itself, what is its IP address. For this, execute the following lines in a terminal or add them to the .bashrc file in your home directory, assuming your Raspberry Pi has the IP address 192.168.22.14.

export ROS_MASTER_URI=http://192.168.22.14:11311
export ROS_IP=192.168.22.14
export ROS_HOSTNAME=192.168.22.14

Now you can start the ROS core in the Raspberry Pi.

Next, you need to tell the second computer, what is the IP address of the ROS master and what is its own IP address. Assuming, the IP address of the second device is 192.168.22.36, you can execute the following commands in a terminal and then run the ROS node that you like to run on that device.

export ROS_MASTER_URI=http://192.168.22.14:11311
export ROS_IP=192.168.22.36
export ROS_HOSTNAME=192.168.22.36

This should allow you to have the Raspberry set up as the ROS master and the second device communicate with the ROS master remotely.

edit flag offensive delete link more
0

answered 2021-08-08 01:52:29 -0500

I believe these tutorials are all you need ( Network Setup, Multiple Machines ), however, if you need anything more comment here and I update the answer.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-08-07 23:12:46 -0500

Seen: 1,775 times

Last updated: Aug 08 '21