micro-ROS / freertos_apps

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

Olimex STM32 E407 FreeRTOS Broken: Build and PingPong App #84

Closed Kelly-Coffey closed 2 years ago

Kelly-Coffey commented 2 years ago

Issue template

Steps to reproduce the issue

Just run the FreeRTOS Ping-Pong first app Tutorial with Foxy as RTOS version

Expected behavior

Buld works, client can connect to agent and can send out pings

Actual behavior

Since last Friday 11/5 with previous install client create init options // create init_options RCCHECK(rclc_support_init(&support, 0, NULL, &allocator));

but agent would crash when initializing pingpong_node. // create node rcl_node_t node; RCCHECK(rclc_node_init_default(&node, "pingpong_node", "", &support)); ,== crashed here.

Today following the tutorial fresh the build does not complete and issues the following error.

Starting >>> microxrcedds_client
Finished <<< tracetools_launch [1.02s]
Finished <<< tracetools [2.60s]
Finished <<< rosidl_parser [1.28s]                                                                    
Starting >>> rosidl_cmake
Finished <<< ros2trace [0.93s]                                                                             
Finished <<< tinydir_vendor [3.97s]                                                                         
Starting >>> rcutils
Finished <<< rosidl_cmake [1.08s]                                                                               
Starting >>> rosidl_generator_dds_idl
--- stderr: microxrcedds_client                                                                                 
/home/ubu/ws_check/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/ip_posix.c:18:10: fatal error: arpa/inet.h: No such file or directory
 #include <arpa/inet.h>
          ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/microxrcedds_client.dir/build.make:391: CMakeFiles/microxrcedds_client.dir/src/c/profile/transport/ip/ip_posix.c.obj] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/Makefile2:79: CMakeFiles/microxrcedds_client.dir/all] Error 2
make[1]: *** [Makefile:133: all] Error 2

Additional information

Thank you

pablogs9 commented 2 years ago

I have followed the steps in the FreeRTOS tutorial and I have found no problem. Check my session.

Could you provide steps for replicating?

Kelly-Coffey commented 2 years ago

Sorry. I should have been more complete with my steps to reproduce. I watched your video and was worried something was wrong with my ROS2 install until I saw you use serial as the transport. The tutorial is serial..,but I am using Ethernet as the transport.

I found the commit in Micro-XRCE-DDS-Client https://github.com/eProsima/Micro-XRCE-DDS-Client/commit/b8f251d1a1010963c8a2ebdda2951fa2627820c0

"Fix missing declarations of inet_to family for POSIX_NOPOLL (#272) Signed-off-by: Patrick Roncagliolo ronca.pat@gmail.com"

which causes the following build error "--- stderr: microxrcedds_client
/home/ubu/microros_ws/firmware/mcu_ws/eProsima/Micro-XRCE-DDS-Client/src/c/profile/transport/ip/ip_posix.c:18:10: fatal error: arpa/inet.h: No such file or directory

include <arpa/inet.h>

      ^~~~~~~~~~~~~

compilation terminated."

I will continue to debug the Agent issue I am seeing with Ethernet. Thanks

pablogs9 commented 2 years ago

I have been checking and:

Why is this not being included correctly? I'll continue checking

pablogs9 commented 2 years ago

Got it! I this that this PR can solve the problem: https://github.com/micro-ROS/freertos_apps/pull/85

Can you test this branch?

Kelly-Coffey commented 2 years ago

I have tested. The build works and the client is able to connect and publish pings with the agent. I did not check pong.