To interact with the rocket you'll need a laptop. Ideally you can use the Thinkpad P1 (andrea-pc) which is at TP. Otherwise, youll have to do a few steps to configure your machine.
Setting up the Local Wifi¶
You can find the password for fma-d here.
Setup wifi sharing¶
You'll probably want to push and pull changes on the rocket to the crs repo. To do so, the RPi needs internet access. Since fma-d is a local network you will have to share the wifi of your laptop with the Pi. On ubuntu, you can follow these steps:
- Connect your PC and the RPi using an ethernet cable.
- Open the network settings. You should see the active connection which is named "wired connection 1" or "Profile 1" or something similar.
- Click on the "+" icon to create a new profile
- Name it something like "SharedToRobot" or something which you'll remember
- Go to the IPv4 tab and change the
IPv4 MethodfromAutomatic (DHCP)toShared to other computers- If you do not see this option, save the profile you just created, open a terminal and type
nm-connection-editor - Select the profile you created from the "Ethernet" toggle
- Go to IPv4 Settings and set
MethodtoShared to other computersand press "Save"
- If you do not see this option, save the profile you just created, open a terminal and type
- If you ssh to the rocket over ethernet using
ssh ubuntu@emborocket.local, you should now have internet access if your laptop is connected toeduroam
:information_source: Note: It may be necessary to disable (or reconfigure) the firewall to allow network sharing.
Accessing ROS Topics on the Host¶
If you wish to visualize ROS topics running on the rocket on your laptop you can follow these steps:
- Connect to the rocket (wifi or lan)
- run
tmuxin terminal (you can also check if a tmux session is already running usingtmux lsand if only one session is runningtmux a) - Make sure
network_mode: “host”is set in the docker compose- We need to expose all ports to the host machine so we can connect to the roscore and stream topics to another machine
- Start crs docker (
crs-docker runform the crs directory) in one tmux window and runroscore - In another tmux window, figure out the ip address of the pi using
ip afor the specific network you want to use for the test (probably eth0 for lan and wlan0 for wifi). - In another tmux window,
docker exec -it <CRS-DOCKER-NAME> bash- Then,
export ROS_MASTER_URI=http://emborocket.local:11311andexport ROS_IP=<IP-OF-PI>where you insert the ip you found in step 5. roslaunchyour favourite program
- Then,
- on the ‘visualization laptop’,
export ROS_MASTER_URI=http://emborocket.local:11311and then you should be able to see the topics being streamedrostopic echo /your/favourite/topic - Launch your favourite visualizer