Ask Your Question

Jefecito's profile - activity

2021-12-27 12:03:30 -0600 marked best answer micro-ros agent only starts for the second time after uC manual reset

Hello,

I am building a launcher for a Micro-ROS application running Zephyr RTOS on STM32. I stumbled upon a situation that happens when the agent is started by the second time after being interrupted by a ctrl+c or by a $ killall micro_ros_agent. It freezes in the logger setup line, just before the initialization of topics, publishers, subscribers, and services, like this:

$ ros2 run  micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0 
[1639862248.302385] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
[1639862248.302663] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 4

It only resumes if the microcontroller reset button is pressed:

[1639862662.431163] info     | TermiosAgentLinux.cpp | fini                     | server stopped         | fd: 3
[1639862662.443154] info     | TermiosAgentLinux.cpp | init                     | Serial port not found. | device: /dev/ttyACM0, error 2, waiting for connection...
[1639862663.140021] info     | TermiosAgentLinux.cpp | init                     | running...             | fd: 3
[1639862664.207718] info     | Root.cpp           | create_client            | create                 | client_key: 0x59B06063, session_id: 0x81
[1639862664.208181] info     | SessionManager.hpp | establish_session        | session established    | client_key: 0x59B06063, address: 0
[1639862664.254578] info     | ProxyClient.cpp    | create_participant       | participant created    | client_key: 0x59B06063, participant_id: 0x000(1)
[1639862664.257543] info     | ProxyClient.cpp    | create_replier           | replier created        | client_key: 0x59B06063, requester_id: 0x000(7), participant_id: 0x000(1)
[1639862664.260180] info     | ProxyClient.cpp    | create_replier           | replier created        | client_key: 0x59B06063, requester_id: 0x001(7), participant_id: 0x000(1)
[1639862664.262102] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x59B06063, topic_id: 0x000(2), participant_id: 0x000(1)
[1639862664.263761] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x59B06063, publisher_id: 0x000(3), participant_id: 0x000(1)
[1639862664.265743] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x59B06063, datawriter_id: 0x000(5), publisher_id: 0x000(3)
[1639862664.271523] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x59B06063, topic_id: 0x001(2), participant_id: 0x000(1)
[1639862664.273199] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x59B06063, publisher_id: 0x001(3), participant_id: 0x000(1)
[1639862664.275206] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x59B06063, datawriter_id: 0x001(5), publisher_id: 0x001(3)
[1639862664.280842] info     | ProxyClient.cpp    | create_topic             | topic created          | client_key: 0x59B06063, topic_id: 0x002(2), participant_id: 0x000(1)
[1639862664.286361] info     | ProxyClient.cpp    | create_publisher         | publisher created      | client_key: 0x59B06063, publisher_id: 0x002(3), participant_id: 0x000(1)
[1639862664.288642] info     | ProxyClient.cpp    | create_datawriter        | datawriter created     | client_key: 0x59B06063, datawriter_id: 0x002(5), publisher_id: 0x002(3)

The necessity of resetting the board every time I need to restart the agent is too inconvenient since the board is inside the robot. Is there a way to prevent it or a way to reset the microcontroller automatically after an agent interruption?

2021-12-18 15:32:31 -0600 asked a question micro-ros agent only starts for the second time after uC manual reset

micro-ros agent only starts for the second time after uC manual reset Hello, I am building a launcher for a Micro-ROS a

2021-12-02 02:13:04 -0600 commented question micro-ros zephyr - Fault during interrupt handling

No, the stack wasn't the problem. I just discovered what was happening. It seems my mistake while using the GPIO API. It

2021-12-02 01:08:17 -0600 received badge  Enthusiast
2021-12-01 13:54:04 -0600 commented question micro-ros zephyr - Fault during interrupt handling

Thank you. Yes, I will do it.

2021-12-01 13:43:11 -0600 received badge  Student (source)
2021-12-01 13:27:35 -0600 commented question micro-ros zephyr - Fault during interrupt handling

Hi, @osilva. Yes, I saw this tutorial. BTW, it's a very good initiative. But, I am not using any of these types of inter

2021-12-01 09:10:20 -0600 edited question micro-ros zephyr - Fault during interrupt handling

micro-ros zephyr - Fault during interrupt handling Hello, I am developing an app that has 4 GPIO input interrupts for t

2021-12-01 09:08:03 -0600 asked a question micro-ros zephyr - Fault during interrupt handling

micro-ros zephyr - Fault during interrupt handling Hello, I am developing an app that has 4 GPIO input interrupts for t

2021-11-30 11:56:16 -0600 commented answer micro-ros add_two_ints_service not working on Galactic with Zephyr

Done! I did it at the zephyr_apps rep. You're welcome.

2021-11-30 11:55:56 -0600 answered a question micro-ros add_two_ints_service not working on Galactic with Zephyr

Done! I did it at the zephyr_apps rep. You're welcome.

2021-11-30 11:55:56 -0600 received badge  Rapid Responder (source)
2021-11-30 06:15:26 -0600 asked a question micro-ros add_two_ints_service not working on Galactic with Zephyr

micro-ros add_two_ints_service not working on Galactic with Zephyr Hello, I am studying Micro-ROS and Zephyr and just f

2017-08-13 18:10:54 -0600 received badge  Famous Question (source)
2017-07-10 02:38:24 -0600 received badge  Notable Question (source)
2017-05-11 13:25:01 -0600 commented question Several ROS nodes through a single serial port

Hello. I am facing a similar problem on a project. I need do communicate with some embedded board on a 485 bus. I tried

2017-05-06 00:12:39 -0600 received badge  Popular Question (source)
2017-05-05 15:07:16 -0600 commented answer Arduino serial communcation via Serial1/2/3 or SoftwareSerial

Hello FrankB, Actually I put this snippet on the inherited NewHardware class overwriting the method write(), like you

2017-05-05 13:49:57 -0600 asked a question Rosserial thru RS485

Rosserial thru RS485 Hello, I am working on a project that has 3 embedded boards for different tasks linked to a PC thr

2017-04-29 16:12:43 -0600 answered a question Arduino serial communcation via Serial1/2/3 or SoftwareSerial

Hello Frank, I am trying to use Rosserial over RS485 based on your solution of Update(3) but on the Python Ros client s