Closed cocodmdr closed 2 years ago
Ok what is happening here is a bit complex:
Solutions:
RCCHECK(rclc_subscription_init_default(&ping_subscriber, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(nav_msgs, msg, Odometry), "/microROS/ping"));
app-colcon.meta
(this file with:
{
"names": {
"rmw_microxrcedds": {
"cmake-args": [
...
]
},
"microxrcedds_client":{
"cmake-args":[
"-DUCLIENT_UDP_TRANSPORT_MTU=1024"
]
},
}
}
Please close if you solve the issue.
I tried the second solution : Increase the MTU in the app-colcon.meta It does not work : I still have the same problem.
First solution ( Use a reliable subscriber) works only for some time and then crashes. I tried 3 times :
Thank you so much for your quick help !
Are you rebuilding the library?
How do you rebuild the library ? I just ran these commands after making the modifications in the app.c:
ros2 run micro_ros_setup build_firmware.sh
ros2 run micro_ros_setup flash_firmware.sh
For modifying the app.c
that's enough.
If you want to modify app-colcon.meta
you will need to remove some more files. To be sure about increasing the MTU, could you rebuild from scratch?
what do you mind by "rebuild from scratch" ?
ros2 run micro_ros_setup configure_firmware.sh my_app --transport serial
ros2 run micro_ros_setup build_firmware.sh
ros2 run micro_ros_setup flash_firmware.sh
Safest: Is it to create a new workspace folder and download everything again ?
May work: Or remove build and install folder in mcu_ws folder ?
Is it right to use UDP transport here, shouldn't it be SERIAL ?
DUCLIENT_UDP_TRANSPORT_MTU=1024
May work:
Or remove build and install folder in mcu_ws folder ?
does not work
Is it right to use UDP transport here, shouldn't it be SERIAL ? DUCLIENT_UDP_TRANSPORT_MTU=1024
Yes sorry, I made my tests using UDP, but in fact it should be UCLIENT_CUSTOM_TRANSPORT_MTU because FreeRTOS transports are implemented as custom transports.
Then is there a typo here ? : DUCLIENT_UDP_TRANSPORT_MTU=1024
Shoud it be ? : UCLIENT_UDP_TRANSPORT_MTU=1024
UCLIENT_CUSTOM_TRANSPORT_MTU=1024
Using this parameter instead does not work either, same problem. Here is my app-colcon.meta file :
{
"names": {
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=1",
"-DRMW_UXRCE_MAX_PUBLISHERS=2",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=2",
"-DRMW_UXRCE_MAX_SERVICES=0",
"-DRMW_UXRCE_MAX_CLIENTS=0",
"-DRMW_UXRCE_MAX_HISTORY=4",
]
},
"microxrcedds_client":{
"cmake-args": [
"-UCLIENT_CUSTOM_TRANSPORT_MTU=1024"
]
}
}
}
You need to use the -D
, beacuse they are CMake args:
{
"names": {
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=1",
"-DRMW_UXRCE_MAX_PUBLISHERS=2",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=2",
"-DRMW_UXRCE_MAX_SERVICES=0",
"-DRMW_UXRCE_MAX_CLIENTS=0",
"-DRMW_UXRCE_MAX_HISTORY=4",
]
},
"microxrcedds_client":{
"cmake-args": [
"-DUCLIENT_CUSTOM_TRANSPORT_MTU=1024"
]
}
}
}
This change triggers an other problem : region `RAM' overflowed by 11264 bytes
These are the last log lines of ros2 run micro_ros_setup build_firmware.sh
/home/student/microros_ws/firmware/toolchain/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /home/student/microros_ws/firmware/freertos_apps/microros_olimex_e407_extensions/build/micro-ROS.
elf section `.bss' will not fit in region `RAM'
/home/student/microros_ws/firmware/toolchain/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: region `RAM' overflowed by 11264 bytes
collect2: error: ld returned 1 exit status
make: *** [Makefile:368: /home/student/microros_ws/firmware/freertos_apps/microros_olimex_e407_extensions/build/micro-ROS.elf] Error 1
Thank you very much ! This seems to be working so far !
What about the first solution you proposed ? It works only for some times and then stops.
- Use a reliable subscriber:
RCCHECK(rclc_subscription_init_default(&ping_subscriber, &node, ROSIDL_GET_MSG_TYPE_SUPPORT(nav_msgs, msg, Odometry), "/microROS/ping"));
Let me reproduce it.
fit the MTU to something similar to your message size
How can I calculate the size of odometry message ? Trial an error with dichotomy ?
Kind of tricky but your library should have this symbol: https://github.com/micro-ROS/micro_ros_arduino/blob/811f2caee1728750a9d08e10e6309d1801771875/src/nav_msgs/msg/detail/odometry__rosidl_typesupport_microxrcedds_c.h#L21
Any updates on this?
Last time I used it, it was working for approximately 3000 seconds and then it crashed. I have not done further measurements. It is the last week of my internship next week so I hope I can try again.
Any updates on this?
Closing due to inactivity, reopen if needed.
Hello,
I am using last software (02 March 2021) with Olimex e407, freeRTOS and transport serial. I modified the ping pong app in order to use nav_msgs msg Odometry instead of std_msgs msg Header.
Ping is published only once and then agent continously throw this error :
Here is my app.c :
Thank you !