mros2
mros2 copied to clipboard
need to implement QoS feature for RELIABILITY, to observe msg by rqt
When we want to observe msg by rqt, the following log occurs and it cannot be observed on Topic Monitor.
$ rqt
[WARN] [1694593985.541597582] [rqt_gui_py_node_1735161]: New publisher discovered on topic '/to_linux', offering incompatible QoS. No messages will be received from it. Last incompatible policy: RELIABILITY
This is because the default QoS policy for rqt (and rviz) is set to RELIABILITY, maybe from Galactic.
https://github.com/ros-visualization/rqt/issues/187
https://answers.ros.org/question/358669/problem-to-read-topics-with-sensorqos-in-rviz-and-rqt/
So, we need to implement the feature to select QoS policy to RELIABLE, or set the default to RELIABLE. Fortunately, embeddedRTPS offers BEST_EFFORT and RELIABLE as selectable QoS policies.
This may be realized by modifying the following line from false to true. In addition, this should be able to be configured as mros2 API.
https://github.com/mROS-base/mros2/blob/main/src/mros2.cpp#L157
code in embeddedRTPS: https://github.com/mROS-base/embeddedRTPS/blob/de70e01959afdf218af8a227f054226f78806cdd/src/entities/Domain.cpp#L344-L353
However, I cannot confirm the operation on mros2-mbed by just modifying it to true, probably due to the configuration of rtps/config.h.
mros2-mbed start!
app name: echoback_string
Successfully connected to network
IP Address: 192.168.11.2
[MROS2LIB] set IP address for RTPS communication
[MROS2LIB] mros2_init task start
mROS 2 initialization is completed
[MROS2LIB] create_node
[MROS2LIB] start creating participant
[MROS2LIB] successfully created participant
[MROS2LIB] create_publisher complete.
[MROS2LIB] create_subscription complete.
++ MbedOS Error Info ++
Error Status: 0x8003012D Code: 301 Module: 3
Error Message: sys_thread_new number error
Location: 0x8010AAF
Error Value: 0x6
Current Thread: mROS2Thread Id: 0x200141F0 Entry: 0x80050B1 StackSize: 0x1388 StackMem: 0x20014238 SP: 0x20015500
For more info, visit: https://mbed.com/s/error?error=0x8003012D&tgt=NUCLEO_F767ZI
-- MbedOS Error Info --
= System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting =�