Skip to content

Commit 9439f72

Browse files
committed
rdd2: Add RTK support
By receiving RTCM3 messages through synapse_pb and forwarding them to the modem to apply corrections. To build with RTK support: west build -b vmu_rt1170//cm8 app/rdd2 -- \ -DEXTRA_CONF_FILE=overlay-rtk.conf Signed-off-by: Luis Ubieda <luisf@croxel.com>
1 parent 7f64d94 commit 9439f72

8 files changed

Lines changed: 24 additions & 2 deletions

File tree

app/rdd2/sample.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ tests:
2424
- rdd2
2525
integration_platforms:
2626
- mr_navq95a/mimx9596/m7/flash
27+
rdd2.vmu_rt1170/rtk:
28+
tags:
29+
- rdd2
30+
- rtk
31+
extra_args:
32+
- EXTRA_CONF_FILE="overlay-rtk.conf"
33+
integration_platforms:
34+
- vmu_rt1170/mimxrt1176/cm7

drivers/synapse/eth_rx/src/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ static void handle_frame(synapse_pb_Frame *frame)
7474
} else if (frame->which_msg == synapse_pb_Frame_odometry_tag) {
7575
msg = &frame->msg.odometry;
7676
topic = &topic_odometry_ethernet;
77+
} else if (frame->which_msg == synapse_pb_Frame_rtcm3_tag) {
78+
msg = &frame->msg.rtcm3;
79+
topic = &topic_rtcm3;
7780
#ifdef CONFIG_CEREBRI_DREAM_HIL
7881
} else if (frame->which_msg == synapse_pb_Frame_battery_state_tag) {
7982
msg = &frame->msg.battery_state;

drivers/synapse/topic/include/synapse_shell_print.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ int snprint_pose(char *buf, size_t n, synapse_pb_Pose *m);
2929
int snprint_pwm(char *buf, size_t n, synapse_pb_Pwm *m);
3030
int snprint_quaternion(char *buf, size_t n, synapse_pb_Quaternion *m);
3131
int snprint_rates_sp(char *buf, size_t n, synapse_pb_Vector3 *m);
32+
int snprint_rtcm3(char *buf, size_t n, synapse_pb_Rtcm3 *m);
3233
int snprint_safety(char *buf, size_t n, synapse_pb_Safety *m);
3334
int snprint_status(char *buf, size_t n, synapse_pb_Status *m);
3435
int snprint_timestamp(char *buf, size_t n, synapse_pb_Timestamp *m);

drivers/synapse/topic/include/synapse_topic_list.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <synapse_pb/odometry.pb.h>
2121
#include <synapse_pb/pwm.pb.h>
2222
#include <synapse_pb/quaternion.pb.h>
23+
#include <synapse_pb/rtcm3.pb.h>
2324
#include <synapse_pb/safety.pb.h>
2425
#include <synapse_pb/status.pb.h>
2526
#include <synapse_pb/twist.pb.h>
@@ -71,6 +72,7 @@ ZROS_TOPIC_DECLARE(topic_odometry_ethernet, synapse_pb_Odometry);
7172
ZROS_TOPIC_DECLARE(topic_orientation_sp, synapse_pb_Vector3);
7273
ZROS_TOPIC_DECLARE(topic_position_sp, synapse_pb_Vector3);
7374
ZROS_TOPIC_DECLARE(topic_pwm, synapse_pb_Pwm);
75+
ZROS_TOPIC_DECLARE(topic_rtcm3, synapse_pb_Rtcm3);
7476
ZROS_TOPIC_DECLARE(topic_safety, synapse_pb_Safety);
7577
ZROS_TOPIC_DECLARE(topic_status, synapse_pb_Status);
7678
ZROS_TOPIC_DECLARE(topic_velocity_sp, synapse_pb_Vector3);

drivers/synapse/topic/src/synapse_shell_print.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,9 @@ int snprint_wheel_odometry(char *buf, size_t n, synapse_pb_WheelOdometry *m)
388388
return offset;
389389
}
390390

391+
int snprint_rtcm3(char *buf, size_t n, synapse_pb_Rtcm3 *m)
392+
{
393+
return snprintf_cat(buf, n, "len: %d", m->data.size);
394+
}
395+
391396
// vi: ts=4 sw=4 et

drivers/synapse/topic/src/synapse_topic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ static context_t g_ctx = {.work_item = Z_WORK_INITIALIZER(topic_work_handler),
7878
(odometry_ethernet, &topic_odometry_ethernet, "odometry_ethernet"), \
7979
(orientation_sp, &topic_orientation_sp, "orientation_sp"), \
8080
(position_sp, &topic_position_sp, "position_sp"), (pwm, &topic_pwm, "pwm"), \
81+
(rtcm3, &topic_rtcm3, "rtcm3"), \
8182
(safety, &topic_safety, "safety"), (status, &topic_status, "status"), \
8283
(velocity_sp, &topic_velocity_sp, "velocity_sp"), \
8384
(wheel_odometry, &topic_wheel_odometry, "wheel_odometry")

drivers/synapse/topic/src/synapse_topic_list.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ ZROS_TOPIC_DEFINE(odometry_ethernet, synapse_pb_Odometry);
206206
ZROS_TOPIC_DEFINE(orientation_sp, synapse_pb_Quaternion);
207207
ZROS_TOPIC_DEFINE(position_sp, synapse_pb_Vector3);
208208
ZROS_TOPIC_DEFINE(pwm, synapse_pb_Pwm);
209+
ZROS_TOPIC_DEFINE(rtcm3, synapse_pb_Rtcm3);
209210
ZROS_TOPIC_DEFINE(safety, synapse_pb_Safety);
210211
ZROS_TOPIC_DEFINE(status, synapse_pb_Status);
211212
ZROS_TOPIC_DEFINE(velocity_sp, synapse_pb_Vector3);
@@ -240,6 +241,7 @@ static struct zros_topic *topic_list[] = {
240241
&topic_orientation_sp,
241242
&topic_position_sp,
242243
&topic_pwm,
244+
&topic_rtcm3,
243245
&topic_safety,
244246
&topic_status,
245247
&topic_velocity_sp,

west.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ manifest:
4242
path: modules/lib/cyecca
4343
- name: synapse_pb
4444
remote: cognipilot
45-
revision: f038dd178faac0481033e5e4c757e31777c1b0be # main 11/10/25
45+
revision: pull/7/head
4646
path: modules/lib/synapse_pb
4747
- name: hal_nxp
4848
remote: cognipilot
4949
revision: cf8f1631e862528ee044850bcc70273975b90771 # master 10/27/25
5050
path: modules/hal/nxp
5151
- name: zros_drivers
5252
remote: cognipilot
53-
revision: pull/26/head
53+
revision: pull/27/head
5454
path: modules/lib/zros_drivers
5555
- name: zephyr_boards
5656
remote: cognipilot

0 commit comments

Comments
 (0)