-
Notifications
You must be signed in to change notification settings - Fork 4
Bash Scripts
- The following are defined in
~/gra/.devcontainer/convenience.shand the scripts that it sources. Please read further for more details. - Many environmental variables (settings!) are written in
~/gra/.devcontainer/env_vars.sh, modify that and you modify the behaviour of commands too.
-
dev: Runs the development bringup. Includes all nodes, and a debug GUI (rviz). Shortcut forroslaunch gra_dev dev.launch-
IMPORTANT: Because many of the nodes are running remotely, you cannot see the logs using
roslaunchalone. Use in tandem with the next command.
-
IMPORTANT: Because many of the nodes are running remotely, you cannot see the logs using
-
log: Logs all the node’s information out.Useful to run
log &when you create a new terminal for running launch files, which means you run log in the background, still showing the new log entries while allowing you to enter other commands such asdev. -
grainfo: Shows information about where you are running your command (devcontainer, or robot); and basic info of ROSroot@mycomp:~/gra# grainfo Device: RoboCapture Dev Environment Master: Local roscore status: Not running Bot status (gra.local): Online on 192.168.0.106 -
pexport: Allows you to export environmental variables persistently.root@mycomp:~/gra# pexport TEST_VAR "Hello world" Variable TEST_VAR has been set to "Hello world" and pexported.
-
punset: Allows you to remove variable definitions set bypexportroot@mycomp:~/gra# punset TEST_VAR Variable TEST_VAR has been unset and removed from pexported variables.
-
cdws: CD into thecatkin_ws -
cdrepo: CD into the repository
-
cb:catkin buildall your packages, and makes them available instantly. Magically works everywhere, unlikecatkin build, where you must be within your workspace.root@mycomp:~/gra# cb ---------------------------------------------------- Profile: default Extending: [cached] /opt/ros/noetic Workspace: /root/catkin_ws ---------------------------------------------------- Build Space: [exists] /root/catkin_ws/build Devel Space: [exists] /root/catkin_ws/devel Install Space: [unused] /root/catkin_ws/install Log Space: [exists] /root/catkin_ws/logs Source Space: [exists] /root/gra/ros DESTDIR: [unused] None ---------------------------------------------------- Devel Space Layout: linked Install Space Layout: None ---------------------------------------------------- Additional CMake Args: None Additional Make Args: None Additional catkin Make Args: None Internal Make Job Server: True Cache Job Environments: False ---------------------------------------------------- Buildlisted Packages: None Skiplisted Packages: None ---------------------------------------------------- Workspace configuration appears valid. ---------------------------------------------------- [build] Found 3 packages in 0.0 seconds. [build] Package table is up to date. Starting >>> gra_base Starting >>> gra_navigation Starting >>> gra_state_manager Finished <<< gra_navigation [ 0.1 seconds ] Finished <<< gra_state_manager [ 0.1 seconds ] Finished <<< gra_base [ 0.2 seconds ] [build] Summary: All 3 packages succeeded! [build] Ignored: None. [build] Warnings: None. [build] Abandoned: None. [build] Failed: None. [build] Runtime: 0.4 seconds total.
-
cbs:catkin buildall your packages on both your development computer and the bot! -
setbotmaster: TargetsROS_MASTERto the robot -
setdevmaster: TargetsROS_MASTERto your development computer
-
abl: a.k.a. Arduino build library; builds ROS message types for Arduino to consume viarosserial. Needs to be run every time your message types change. -
ac: Arduino compile (compiles your.inocode). Requires an up-to-daterosserialROS library built byabl. -
au: Arduino upload, uploads your code to the Arduino. Currently requires the Arduino be connected via USB.Note: Dependent on the
$ARDUINO_UPDATE_PORTvariable, defaults to/dev/ttyACM0(USB) -
acu:ac+au, useful for quickly compiling and uploading your code. -
acm:cb+abl+ac, useful for making sure your Arduino related code is all up to date and can be built
Note: The following are commands meant to be run on the Docker devconatiner. May not work correctly on the robot.
-
botdo: Runs any command on the robot. Like howsudomakes the superuser execute things for you, it makes the robot execute things for you! -
botsh: Opens a shell on the bot. -
botsync: Synchronizes the code on the bot with the code in the docker. -
alldo: Relative ofbotdo, but runs it first locally, then on the robot
-
RUN: Emulates the RUN line inDockerfiles. Meant to run installation commands while simultaneously adding it to theDockerfileif it succeeds.root@mycomp:~/gra# RUN apt-get install -y x11-utils Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease ... # (removed for brevity) Processing triggers for libc-bin (2.31-0ubuntu9.9) ... The command succeeded with exit code 0. Adding to Dockerfile.
-
UNRUN: Allows you to practically undoRUNcommands.