micro-ROS / micro_ros_renesas_demos

Demo code for Renesas e2 studio
Apache License 2.0
4 stars 5 forks source link

micro_ros_udp_freertos Demo not working #139

Open nirmalka94 opened 9 months ago

nirmalka94 commented 9 months ago

Issue template

Steps to reproduce the issue

Follow the exact readme in the repo : https://github.com/micro-ROS/micro_ros_renesas_demos/tree/iron

Expected behavior

When running the docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:$ROS_DISTRO udp4 --port 8888 -v6 Command, we should be able to get the ros topic published from the micro controller

Actual behavior

No response after running micro ros agent. Also, No ROS topics or nodes listed. Pinging to the board takes too much of time. but even after that no sign of the micro ROS node running on the MCU.

Additional information

Tried with different versions of ROS2, NO luck

pablogs9 commented 9 months ago

Could you paste here the output log of the micro-ROS Agent? Are you resetting the board after enabling the micro-ROS Agent?

nirmalka94 commented 9 months ago

Could you paste here the output log of the micro-ROS Agent? Are you resetting the board after enabling the micro-ROS Agent?

ros2 run micro_ros_agent micro_ros_agent udp4 --port 8080 -v6

[1701068063.402519] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8080
[1701068063.402746] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 6

I tried to reset the board but nothing changed. When I reconnect the power supply( micro USB) on the EK-Board, it connects to the agent and runs the demo.( this is a new development after i posted this issue)

pablogs9 commented 9 months ago

So it is working?

nirmalka94 commented 9 months ago

So it is working?

It only works when i reconnect the USB cable on the board. If i close the micro ros agent and restart it, it will not connect.

pablogs9 commented 9 months ago

micro-ROS does not handle reconnections in these examples, please read: https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/handle_reconnections/handle_reconnections.html

nirmalka94 commented 9 months ago

micro-ROS does not handle reconnections in these examples, please read: https://docs.vulcanexus.org/en/latest/rst/tutorials/micro/handle_reconnections/handle_reconnections.html

Thank you!. I'll check that and get back to you.

But the reconnection of USB is not always reliable. Sometimes it's connecting. Sometimes it's not. is there any standard process to run the demos? I feel the documentation is not really sufficient. Could you help ?

nirmalka94 commented 9 months ago

The reconnection of USB is not always reliable. Sometimes it's connecting. Sometimes it's not. is there any standard process to run the demos? I feel the documentation is not really sufficient. Could you help ?

pablogs9 commented 9 months ago

Have you implemented something like the reconnection state machine proposed in the documentation?

nirmalka94 commented 9 months ago

Have you implemented something like the reconnection state machine proposed in the documentation?

Not yet, But I am having issues with the demo you have provided( micro_ros_udp_freertos). It's not running as intended.

pablogs9 commented 9 months ago

If your micro-ROS Client is communication with the micro-ROS Agent using a UDP port, what does "USB is not always reliable" means?

nirmalka94 commented 9 months ago

If your micro-ROS Client is communication with the micro-ROS Agent using a UDP port, what does "USB is not always reliable" means?

I meant the USB power supply code.

pablogs9 commented 9 months ago

What is the USB power supply code?

nirmalka94 commented 9 months ago

What is the USB power supply code?

IMG_20231127_152330.jpg