micro-ROS / micro-ROS_sensors_demo

Provides a demo of micro-ROS based on ST Disco L475 IOT01 board.
Apache License 2.0
12 stars 3 forks source link

ros2 topic list only sometimes showing topics #8

Closed torbenf closed 1 year ago

torbenf commented 3 years ago

I'm using foxy on Ubuntu 20.04. With the help of @altineller on this and the other issue I was able to get it to work. Thanks a lot for that =) Namely I changed the following:

When I now do a docker-compose up --build I see the agent starting up and data being transmitted, e.g.:

stiot_agent_1    | [1617786788.116564] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0x5B89F2CA, len: 13, data: 
stiot_agent_1    | 0000: 81 00 00 00 0A 01 05 00 23 0D 00 00 80
stiot_agent_1    | [1617786788.117852] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | client_key: 0x5B89F2CA, len: 24, data: 
stiot_agent_1    | 0000: 81 80 23 0D 07 01 10 00 0D 2E 00 15 39 B4 48 3D 4C 37 09 BE 96 43 1F 41
stiot_agent_1    | [1617786788.117904] debug    | DataWriter.cpp     | write                    | [** <<DDS>> **]        | client_key: 0x00000001, len: 12, data: 
stiot_agent_1    | 0000: 39 B4 48 3D 4C 37 09 BE 96 43 1F 41
stiot_agent_1    | [1617786788.117950] debug    | SerialAgentLinux.cpp | send_message             | [** <<SER>> **]        | client_key: 0x5B89F2CA, len: 13, data: 
stiot_agent_1    | 0000: 81 00 00 00 0A 01 05 00 24 0D 00 00 80
stiot_agent_1    | [1617786788.119352] debug    | SerialAgentLinux.cpp | recv_message             | [==>> SER <<==]        | 

however

All I'm doing between two runs with different outcomes is CTRL + c to stop the containers, wait for them to stop and then pressing the restart button on the board and doing a docker-compose up --build again.


While writing this I noticed, that I can do the following to get it to work more reliable.

  1. After doing the changes described above and rebuilding the containers Ido a docker-compose up -d
  2. If rqt doesn't start up press reset button on board and wait for rqt to show up
  3. If rqt starts up but doesn't show data just close rqt and do a docker-compose up -d again

I can live with this behavior, especially because it's just a demo, but wanted to leave this here so others may struggle less. Regards

pablogs9 commented 3 years ago

Hello @torbenf can you PR the privileged: true changes to this repo?