diff --git a/behaviours/sam_diving_controller/README.md b/behaviours/sam_diving_controller/README.md
index d8fe0af8..667cbc39 100644
--- a/behaviours/sam_diving_controller/README.md
+++ b/behaviours/sam_diving_controller/README.md
@@ -28,12 +28,14 @@ Both launch files call Node.py, which takes care of the rest.
If you want to test something and provide your own waypoint, that's the way to go.
-### ActionServerDiveController.py
+### ActionServerDiveSub.py
-Inherits from DiveController.py, but allows you to interface with the BT action
-server instead.
+Inherits from DiveSub and the SMARCActionServer, but allows you to interface
+with the BT action server instead. The action implemented is a
+`auv-depth-move-to` action which requires a positive desired depth, rpm, and
+the waypoint from the GUI.
-### ConvenienceView.py
+### ConveniencePub.py
Defines control convenience topics and publishes to them. That is:
- current state
@@ -43,29 +45,50 @@ Defines control convenience topics and publishes to them. That is:
- current waypoint
All are published under /conv/ to make it easier to read them out afterwards.
+### DiveSub.py
+
+Reads out all robot states and provides the `get/set` methods for the
+controller.
+
### DiveController.py
-Reads out all robot states. This is a MVC Controller, not a control theory
-controller!
+This files contains all controller classes available. The I/O interface can
+change between them, depending on their respective needs. All classes inherit
+from `DiveControllerInterace` which provides all common functions. The control
+happens in the update function of the respective controller. Right now we have
+the following controller classes:
+
+#### DiveControllerPID
+
+Basic PID controller for waypoint following. Distinguishes between static and
+dynamic diving and uses either VBS/LCG for static diving or thrust-vectoring
+for dynamic diving. All parameters are specified in
+sam\_diving\_controller\_config.yaml. Each PID gain, min, max, and neutral
+actuator values as well as emergency actuator values.
-### DivingModel.py
+#### DepthJoyControllerPID
-This is the actual control, currently running several PIDs. All parameters are
-specified in sam\_diving\_controller\_config.yaml. Each PID gain, min, max, and
-neutral actuator values as well as emergency actuator values.
+This is a smaller version of the `DiveControllerPID` which we use for keeping
+depth when using the joystick for teleop. It keeps the desired depth and pitch,
+but allows the operator to maneuver the AUV.
-### IDiveView.py
+#### DiveControllerMPC
-Interface for the DiveView. Defines the mission states enum.
+This implements a MPC for waypoint following.
+
+### IDivePub.py
+
+Interface for the DivePub. Defines the mission states enum.
### Node.py
-Runs the different MVC nodes plus a convenience node for extra rostopics.
+Runs the different MVC nodes plus a convenience node for extra rostopics. This
+node loads all required parameters.
Requires the following parameter:
- - view\_rate: rate of the view node
- - model\_rate: rate of the model node
+ - pub\_rate: rate of the publisher node
- controller\_rate: rate of the controller node
+ - sub\_rate: rate of the subscriber node
- convenience\_rate: rate of the convenience node
These are set in sam\_diving\_controller\_config.yaml.
@@ -74,7 +97,7 @@ These are set in sam\_diving\_controller\_config.yaml.
Reads out all parameters for the DivingModel.py
-### SAMDiveView.py
+### SAMDivePub.py
Publishes all actuator commands. Contains the corresponding set methods.
Requires the following SamTopics:
@@ -96,4 +119,8 @@ Contains the config file for this package
Sample rviz layout to follow the vehicle and visualize the waypoints.
+## plotjuggler
+
+Sample plotjuggler layout to analyse rosbags.
+
diff --git a/behaviours/sam_diving_controller/plotjuggler/control_layout.xml b/behaviours/sam_diving_controller/plotjuggler/control_layout.xml
new file mode 100644
index 00000000..f2437d72
--- /dev/null
+++ b/behaviours/sam_diving_controller/plotjuggler/control_layout.xml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/external_equipment/sam_joy_controllers/sam_joy_controllers/readme.md b/external_equipment/sam_joy_controllers/sam_joy_controllers/readme.md
index c20cb5d9..25856945 100644
--- a/external_equipment/sam_joy_controllers/sam_joy_controllers/readme.md
+++ b/external_equipment/sam_joy_controllers/sam_joy_controllers/readme.md
@@ -49,4 +49,18 @@ roslaunch sam_joy_xbox joy.launch
| --- | --- | --- |
| ```Left stick``` | Send RPM commands to motors | - |
| ```Right stick``` | Send thrust vector commands | - |
-| ```A``` | Toggle teleop enable | ```One short pulse``` - Enabled
```Two short pulse``` - Disabled |
\ No newline at end of file
+| ```A``` | Toggle teleop enable | ```One short pulse``` - Enabled
```Two short pulse``` - Disabled |
+
+## Automatic depth keeping
+
+If needed, the controller can automatically keep a desired depth. For this, launch
+```bash
+ros2 launch sam_joy_xbox joy_depth_control.launch robot_name:=
+```
+with `` the appropriate robot name. The depth setpoint has to be
+published manually with
+```bash
+ros2 topic pub -r 1 /sam/ctrl/elevator_pid/setpoint std_msgs/Float64 "data: -1.0"
+```
+where the data value is the desired depth in an ENU frame, i.e. depth needs to
+be negative.
diff --git a/scripts/smarc_bringups/README.md b/scripts/smarc_bringups/README.md
index 87c40762..3d25b084 100644
--- a/scripts/smarc_bringups/README.md
+++ b/scripts/smarc_bringups/README.md
@@ -13,6 +13,27 @@ We use `tmux` to create tabs and launch things in, for all the reasons `tmux` is
In general, these bash scripts should take minimal number of arguments, if any.
If a large number of args are needed, maybe use a `config.yaml` filename to pass as an arg instead.
+### sam_bringup.sh
+
+Launches everything related to SAM. Add the following lines to your .bashrc and restart your terminal.
+
+```bash
+export LOCAL_ROBOT_NAME=
+
+# Local MQTT Broker with mosquitto
+export LOCAL_MQTT_BROKER_IP=
+export LOCAL_MQTT_BROKER_PORT=
+
+# WARA-PS MQTT Broker
+#export LOCAL_MQTT_BROKER_IP=20.240.40.232ยท
+#export LOCAL_MQTT_BROKER_PORT=1884
+```
+This allows us to change the bringup as we see fit without having to worry
+about individual setups regarding MQTT and the robot name. If you want to use
+the WARA-PS MQTT Broker instead, use uncomment the last two lines instead.
+
+In the beginning of the script, you can set whether you're on SAM or not.
+
## TMUX Cheatsheet
- `C-x` means "press control and `x`" at the same time. If its `C-X`, then its "Control Shift x".