Jbwasse2 / topological-mapping

Topological Maps on Real World Robot
0 stars 0 forks source link

Robot ROS start script #20

Closed Jbwasse2 closed 3 years ago

Jbwasse2 commented 3 years ago

Currently there is a lot of physical work that has to be done in order to get the robot ready in order to use Mateus' ROS code including 1) Killing docker on pi 2) Running terra controller 3) source devel/setup.zsh 4) roslaunch navigation_manager_v2 run_navigation.launch

It would be nice to have a single script on the companion that does all of this.

Jbwasse2 commented 3 years ago

One thing to keep in mind is that the startup script for the updated (websocket) ROS version may be different. So wait until the new websocket ROS is on the robot.

dorianisnairod commented 3 years ago

Semi-automated startup was made. It creates a tmux environment that creates 3 windows. Window 0 is the main terminal and calls source devel/setup.zsh, making it ready for use. Window 1 does an SSH into the Pi, allowing for a future extension of automating the docker killing and terra controller process. Window 2 also does source devel/setup.zsh, and has roslaunch navigation_manager run_minimal.launch typed out so that the user can press enter once they finish the task in Window 1. This also allows for the user to easily modify the launch command if necessary.

Despite not having automated the Pi yet, this process greatly speeds up the time needed to get the robot working and rolling. It was also very insightful to me, as this was my very first shell script written

Jbwasse2 commented 3 years ago

What needs to be done on the Pi?

dorianisnairod commented 3 years ago

Just to kill the docker and start the terracontroller.

Jbwasse2 commented 3 years ago

Can you add something to the script that does this (As I recall you need to run the kill docker script as sudo, if you don't then you can get rid of the following -t flag) ssh -t pi@pi_ip_address "cd /home/docker/ && sudo ./stop_docker.sh" ssh -t pi@pi_ip_address "cd /dir/to/terracontroller/ && sudo ./terracontroller"& Note the ampersand on the second command which runs it as a background process.

dorianisnairod commented 3 years ago

setup_interface.zsh will create a tmux that executes all of the above automatically 🕺

Jbwasse2 commented 3 years ago

Nice job!