Skip to content

Network

Che-Ming Chang edited this page Feb 29, 2024 · 9 revisions

Overview of the network

alt text

Main computer setup

Please make sure you have followed the Installation page on Setup .bashrc for multimachine, connected ethernet to the router, and have roscore running on the main computer.

Main computer settings

in .bashrc make sure to have the following:

export ROS_MASTER_URI=http://192.168.1.100:11311/
export ROS_IP=192.168.1.100

Then, connect the main computer to the router via Ethernet and run roscore.

Remember to run roscore on the main computer after everything is connected.

Raspberry Pi setup

Please make sure you have followed the InstallingRaspberryPi page and have setup the CAN hat for RPI.

Here, we use the Raspberry Pi as a node/interface between the SPI-linked CANBUS via the MCP2515 hat with ROS over ethernet. Other connections for converting ROS messages to CANBUS interfaces can also be used.

Raspberry Pi settings

in .bashrc on the raspberry pi, make sure to have the following:

export ROS_MASTER_URI=http://192.168.1.100:11311/
export ROS_IP=192.168.1.102

Connect the Ethernet cables for the RPI and the main computer to the router. The router should automatically allocate the IP for each device accordingly.

Please ensure the router IP is also in the same domain of 192.168.1.xxx, ideally 192.168.1.1 should be the router's IP

Run rostopic list or rostopic echo \TEST_TOPIC_PUBLISHER from the raspberry pi terminal to check if the ROS network has successfully connected.

Do not start a second roscore on the raspberry pi

Multi-Machine setup

For further information, please check Running ROS across multiple machines

WIP

Clone this wiki locally