ROS2 MicroDDS Communication with PX4 from External FC (FVc2)
-
Hi, I have set up ROS2 Foxy and the voxl-micro-dds-agent on my voxl2 and confirmed the uORB topics are being published in ROS2 as shown:
voxl2:/$ ros2 topic list /fmu/in/obstacle_distance /fmu/in/offboard_control_mode /fmu/in/onboard_computer_status /fmu/in/sensor_optical_flow /fmu/in/telemetry_status /fmu/in/trajectory_setpoint /fmu/in/vehicle_attitude_setpoint /fmu/in/vehicle_command /fmu/in/vehicle_mocap_odometry /fmu/in/vehicle_rates_setpoint /fmu/in/vehicle_trajectory_bezier /fmu/in/vehicle_trajectory_waypoint /fmu/in/vehicle_visual_odometry /fmu/out/failsafe_flags /fmu/out/position_setpoint_triplet /fmu/out/sensor_combined /fmu/out/timesync_status /fmu/out/vehicle_attitude /fmu/out/vehicle_control_mode /fmu/out/vehicle_local_position /fmu/out/vehicle_odometry /fmu/out/vehicle_status /parameter_events /rosout
I planned to use an external FC the FlightCoreV2, but I want to maintain the microdds functionality to get these topics to feed from that over UART. I have the FCv2 on the J18 DSP UART of the Voxl2 via the Apps Proc by disabling voxl-px4.
The FCv2 communicates with Voxl2 and works well but I am wondering if there are any known methods to maintain the uORB topics being published through microdds to Voxl2's ROS2 over UART using this setup. Any help on how to do that would be greatly appreciated!
-
@Gary-Holmgren you will have to either edit or disable the ROS2 DDS on the voxl2 and create a new one that uses the serial link - aka ttyHSX. So in the microdds agent service file in /etc/systemd/system you will have to edit the file to change from listening to the UDP port and then listen the serial link. However, by doing this you will then conflict with the mavlink-server instance running on the voxl2 as well.
LMK if this helps.
Zach -
Looks like I misspoke - you are connecting to the DSP - SO due to that we need to keep voxl-mavlink-server on there to allow the packets to be forwarded from the DSP to the system. I will say there MIGHT be a way to forward the ports from the mavlink-server instance into the microdds agent so the topics are exposed.
We will look into this!
Zach -
@Zachary-Lowell-0 Would definitely be a useful function. I am probably gonna stick with voxl2 running px4 for now since it simplifies things.