Unable to get topic from drone even if micrortps bridge is working
- I have a HoverGames drone running PX4 v1.13.2 and
- An offboard developer system (NavQ Plus) sustained by Ubuntu 22.04 and running ROS2 Humble
- The micrortps_client (on PX4) and micrortps_agent (on offboard computer) are installed and are able to communicate through serial interface.
3A. When I run micrortps_client status
in PX4 shell I can see rx: 0.460 Kb/s and tx: 11.709 Kb/s
. If micrortps_agents is not executed I have rx: 0.0 Kb/s
3B. Or in the final when I close, trhough Ctrl + C, micrortps_agent I get:
[ micrortps_agent ] Interrupt signal (2) received.
[ micrortps_transport ] Closed UART.
[ micrortps_agent ] RECEIVED: 2570 messages - 3770846 bytes; 322869 LOOPS - 326.422 seconds - 11.55KB/s
[ micrortps_agent ] SENT: 3261 messages - 169572 bytes
My personal conclusion, from 3A and 3B, is that micrortps_client and micrortps_agent are able to communicate and exchange data without any problems.
I do not know if it helps, but when micrortps_agent runs, I get continuously:
[ micrortps_agent ] Unexpected topic ID ‘27’ to publish. Please make sure the agent is capable of parsing the message associated to the topic ID ‘27’
Now, the problem:
- By running:
ros2 topic list
(I'm in~/ros2_ws
and. install/setup.sh
was previously executed), and - If export
RMW_IMPLEMENTATION=rmw_fastrtps_cpp
is presented in.bashrc
I get only:
/parameter_events
/rosout
If instead I export:
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=/home/$USER/CycloneDDSConfig.xml
I get also only:
/parameter_events
/rosout
So, the problem is that I'm unable to get any topics even if micrortpsis apparently working. I would appreciate any solution or insight on this problem.
Asked by mdobrea on 2023-03-17 12:18:06 UTC
Comments
I haven't done anything with the micrortps bridge in a while, but I do remember that the micrortps bridge would only use domain id 0 (see https://github.com/PX4/micrortps_agent/blob/main/src/position_setpoint_Subscriber.cpp#L75). So if you're explicitly changing your domain id, Then chances are it's just not gonna work.
Asked by ChuiV on 2023-03-17 18:41:29 UTC