-
Notifications
You must be signed in to change notification settings - Fork 21
Linux
Most of the things in linux are done thorugh the Terminal. Here is a list of the most used commands:
Command | Description |
---|---|
ls | Lists files and folders |
cd | Change the working directory to <folder> |
cp <src> <dest> | Copies <src> to <dest> |
mv <src> <dest> | Moves <src> to <dest> |
sudo | Executes the command as the root user |
mkdir <directory> | Creates a directory in your working directory named <directory> |
rm -rf <directory> | Remove <directory> |
gedit or nano <file> | Opens a text editor to edit <file> |
sudo apt <program> | Installs <program> in Ubuntu |
chmd +x <file> | Makes <file> executable |
The terminal needs to know the location of the ros installation and the current workspace. This is done by adding the locations to the bashrc file, which is run everytime a terminal window is stared. This process is called sourcing.
The following command can be used to edit the bashrc file (use gedit, nano or vim as editor)
nano ~/.bashrc
Make sure the following lines at the bottom of the file (current workspace is usually vortex_ws or catkin_ws)
source /opt/ros/<ros distro>/setup.bash
source ~/<current workspace>/devel/setup.bash
Remember to reopen the terminal or to rerun bashrc after changing it. Rerunning bashrc can be done by:
source ~/.bashrc
During robosub it can be practical to set a script to run automatically when the system starts. This can be done in the following steps
- Create a script that launches the desired AUV software
- Create a service file (like
auv_startup.service
below) and point it to the launch script from step 1 - Move the service file to <TODO: add the right path, its in system somewhere>
- Use
sudo systemctl enable manta_start.service
to start, stop, enable and disable the service. Enable and diable change startup behaviour.
# auv_startup.service
[Unit]
Describtion=auv_startup
[Service]
User=<linux_username>
Environment=DISPLAY=:0.0
ExecStart=/home/<linux_username>/<path_to_launch_script>
[Install]
WantedBy=multi-user.target
HOME User Manual
- Git key setup
- Software installation
- Beluga
- Manta
- Pool testing at MC-Lab
- Using services to launch packages
Development Guidelines
Documentation
Theory and Resources