Closed djaniel closed 1 year ago
Hello @djaniel, the warning that you are seeing during compilation is not relevant.
Regarding the operation of the agent, if I have understood correctly, after building your Arduino sketch in the RP2040, it works with
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy serial --dev /dev/ttyACM0 -v6
but it does not work with
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v6
Is this correct?
My goodness! I don't get it. I connect the aduino to my computer and it does not work straight away. I reset the board, the agent notices the port disappearing and they launch perfectly. The problem is that having to reset the board everytime I launch the system is impractical. Do you know if I am missing something on the code?
By default micro-ROS client does not handle reconnections with the agent. You can check an example on how to do this here: https://github.com/micro-ROS/micro_ros_arduino/tree/humble/examples/micro-ros_reconnection_example
I'm closing since the main issue is solved. Feel free to open new issues if you have more problems.
Micro ROS arduino Humble on RP2040
Steps to reproduce the issue
I have a magnetometer connected to the Arduino RP2040 connect. The code running in the arduino is based on the micro-ros_publisher example included on this repository. I was doing all the testing running Ros 2 Foxy in a container and everything went well. I was getting a sensor_msgs Magnetic Field topic from the arduino. Then I connected the arduino to an embedded computer Ubuntu server 22 - Ros 2 Humble.
During installation of the agent in the embedded computer I got a warning that I didn't see when working with foxy:
I think it is not big deal. Am I wrong?
Then, for testing I did:
The output :
And that is all! As you can see, there are not the whole list of messages we usually see when everything goes well. Apparently, the agent does not connect to the arduino nano.
Trying to solve my problem I came back to docker, this time with an image of Ros 2 Humble. I see the same warning I mentioned earlier and the agent still does not connect to the Arduino.
Unsuccessful last resort:
Expected behavior
That the connection is accomplished and the data from the magnetometer is published in ROS 2 Humble. It strikes me that everything goes well when using foxy. Can you give some tips on how to find the answer to this dilemma?