Skip to content

Commit 543e874

Browse files
committed
Update local launch documentation [skip ci]
1 parent 146d6c7 commit 543e874

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

docs/vitepress/docs/deploy-for-development.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ The recommended way of developing GISNav is to deploy a SITL simulation and supp
1010

1111
The easy way to deploy for development is via the Makefile. Use the below commands to run a local ROS 2 default launch configuration of GISNav and to deploy a supporting SITL simulation as Docker Compose services.
1212

13-
- The `uorb` target uses the `micro-ros-agent` middleware service and `UORBNode`.
14-
- The `ubx` and `nmea` targets use `socat` running on the Docker host to bridge the serial port output via TCP to the SITL simulation container.
13+
- The `uorb` target uses the `micro-ros-agent` middleware service.
14+
- The `ubx` and `nmea` targets use `socat` to bridge the serial communication over TCP between the docker containers.
1515

1616
::: code-group
1717

@@ -20,20 +20,20 @@ cd ~/colcon_ws/src/gisnav
2020
make dev PROTOCOL=uorb
2121
```
2222

23-
```bash [u-blox]
23+
```bash [NMEA <Badge type="tip" text="Recommended"/>]
2424
cd ~/colcon_ws/src/gisnav
25-
make dev PROTOCOL=ubx
25+
make dev PROTOCOL=nmea
2626
```
2727

28-
```bash [NMEA <Badge type="warning" text="Deprecated"/>]
28+
```bash [u-blox]
2929
cd ~/colcon_ws/src/gisnav
30-
make dev PROTOCOL=nmea
30+
make dev PROTOCOL=ubx
3131
```
3232
:::
3333

34-
::: warning NMEA deprecated
35-
The PX4 NMEA driver hard-codes some variables like the `s_variance_m_s` speed variance to 0 which may lead to failsafes triggering (unverified) if only relying on GISNav for velocity estimates (e.g. when [simulating failure of the primary GPS](/README#simulate-gps-failure)).
36-
NMEA also was not originally intended for airborne drone navigation and the message types are not well suited for GISNav's use case.
34+
::: info Todo
35+
UBX support is not fully implemented and most likely does not work yet
36+
3737
:::
3838

3939
::: tip Ctrl-C and relaunch
@@ -58,12 +58,16 @@ ros2 launch gisnav local.launch.py --show-args
5858

5959
### Redirecting serial output for SITL simulation <Badge type="info" text="NMEA/u-blox"/>
6060

61-
The `px4` SITL simulation container listens for serial messages (e.g NMEA or u-blox) at TCP port 15000. GISNav `NMEANode` and `UBXNode` write into a serial port, and this serial port traffic must be bridged to the TCP port of the running `px4` container to make the mock GPS demo work in SITL simulation.
61+
The `px4` SITL simulation container listens for serial messages (NMEA or UBX) at TCP port 15000. GISNav `NMEANode` and `UBXNode` write into ROS, and the `nmea` and `ubx` middlware service use `socat` to bridge the serial communication over TCP between the docker containers. This TCP traffic is again directed to a serial port in the `px4` container to make the mock GPS demo work in SITL simulation.
62+
63+
::: info uORB bypasses the PX4 GPS driver
64+
When using the `uORB` protocol, the PX4 GPS driver is bypassed and the uORB messages are used directly by the FCU.
65+
66+
:::
6267

6368
The Makefile `make dev PROTOCOL=nmea` and `make dev PROTOCOL=ubx` recipes create a pseudo-tty (virtual serial port) using `socat` to bridge the GISNav serial port output via TCP to the Docker container running the SITL simulation. The Makefile hardcodes `localhost` as the container host as the targets are intended for local development, but you can use the below example if your simulation is running on a different host:
6469

6570
```bash
66-
cd ~/colcon_ws/src/gisnav
6771
gnc start px4
6872
PX4_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' gisnav-px4-1)
6973
socat pty,link=/tmp/gisnav-pty-link,raw,echo=0 tcp:$(PX4_IP):15000
@@ -79,16 +83,16 @@ cd ~/colcon_ws
7983
ros2 launch gisnav local.launch.py protocol:=uorb
8084
```
8185

82-
```bash [UBX]
86+
```bash [NMEA <Badge type="tip" text="Recommended"/>]
8387
cd ~/colcon_ws
8488
PTY_PORT=$(readlink /tmp/gisnav-pty-link)
85-
ros2 launch gisnav local.launch.py protocol:=ubx port:=${PTY_PORT} baudrate:=${BAUDRATE:-9600}
89+
ros2 launch gisnav local.launch.py protocol:=nmea port:=${PTY_PORT} baudrate:=${BAUDRATE:-9600}
8690
```
8791

88-
```bash [NMEA <Badge type="warning" text="Deprecated"/>]
92+
```bash [UBX]
8993
cd ~/colcon_ws
9094
PTY_PORT=$(readlink /tmp/gisnav-pty-link)
91-
ros2 launch gisnav local.launch.py protocol:=nmea port:=${PTY_PORT} baudrate:=${BAUDRATE:-9600}
95+
ros2 launch gisnav local.launch.py protocol:=ubx port:=${PTY_PORT} baudrate:=${BAUDRATE:-9600}
9296
```
9397

9498
:::

0 commit comments

Comments
 (0)