micro-ROS / freertos_apps

Sample applications for FreeRTOS + micro-ROS
Apache License 2.0
81 stars 50 forks source link

[HELP WANTED] ping success but agent connection failed when udp link with stm32f767zi. #95

Closed ZhenshengLee closed 2 years ago

ZhenshengLee commented 2 years ago

Issue template

Steps to reproduce the issue

https://github.com/ZhenshengLee/ros2_mcu/tree/master/libs/custom_stm32f767zi

compile and flash with udp configuration. colcon.meta is https://github.com/ZhenshengLee/ros2_mcu/blob/master/mcu_ws/colcon.meta app-colcol.meta is https://github.com/ZhenshengLee/ros2_mcu/blob/master/apps/int32_publisher/app-colcon.meta

Expected behavior

udp connectiong success, with agent output info.

Actual behavior

ping 192.168.1.110 success.

but agent output nothing with

ros2 run micro_ros_agent micro_ros_agent udp4 -p 8000 -v6
[1646914947.040102] info     | UDPv4AgentLinux.cpp | init                     | running...             | port: 8000
[1646914947.040316] info     | Root.cpp           | set_verbose_level        | logger setup           | verbose_level: 6

serial output the follow

image

IP is got, but Failed status on line 37: 1. Aborting.

which is

RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));

Additional information

pablogs9 commented 2 years ago

I cannot access https://github.com/ZhenshengLee/ros2_mcu. Is it private?

ZhenshengLee commented 2 years ago

I cannot access https://github.com/ZhenshengLee/ros2_mcu. Is it private?

Oh... @pablogs9 You can access it now.

pablogs9 commented 2 years ago

Can you check if your code is reaching this function with a JTAG debugger?

Have you tried to run a basic UDP application?

ZhenshengLee commented 2 years ago

Can you check if your code is reaching this function with a JTAG debugger?

@pablogs9 Yes I think it's reaching the function.

image

I will build a minimal udp test program later.

ZhenshengLee commented 2 years ago

@pablogs9 problem solved

I misunderstand the meaning of "-DRMW_UXRCE_DEFAULT_UDP_IP=192.168.1.110"

the host(agent) should be assigned with the IP=192.168.1.110, rather than the client (stm32 device).

closing this.

Thank you.