astralien3000 / riot-ros2 Goto Github PK
View Code? Open in Web Editor NEWROS2 on microcontrollers !
License: Apache License 2.0
ROS2 on microcontrollers !
License: Apache License 2.0
Make error when running:
prompt> cd <PATH-TO-WS>/install/listener_c
prompt> make BOARD=samr21-xpro
...
/root/ros2_riot_ws/install/rcutils/time_unix.c:42:4: error: #error no monotonic clock function available
# error no monotonic clock function available
^~~~~
/root/ros2_riot_ws/install/rcutils/time_unix.c: In function 'rcutils_system_time_now':
/root/ros2_riot_ws/install/rcutils/time_unix.c:65:3: warning: implicit declaration of function 'clock_gettime'; did you mean 'localtime'? [-Wimplicit-function-declaration]
clock_gettime(CLOCK_REALTIME, ×pec_now);
^~~~~~~~~~~~~
localtime
/root/ros2_riot_ws/install/rcutils/time_unix.c: In function 'rcutils_steady_time_now':
/root/ros2_riot_ws/install/rcutils/time_unix.c:96:17: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
clock_gettime(CLOCK_MONOTONIC, ×pec_now);
^~~~~~~~~~~~~~~
/root/ros2_riot_ws/install/rcutils/time_unix.c:96:17: note: each undeclared identifier is reported only once for each function it appears in
/root/ros2_riot_ws/install/RIOT/Makefile.base:81: recipe for target '/root/ros2_riot_ws/install/listener_c/bin/samr21-xpro/rcutils/time_unix.o' failed
make[2]: *** [/root/ros2_riot_ws/install/listener_c/bin/samr21-xpro/rcutils/time_unix.o] Error 1
/root/ros2_riot_ws/install/RIOT/Makefile.base:20: recipe for target 'ALL--/root/ros2_riot_ws/install/rcutils' failed
make[1]: *** [ALL--/root/ros2_riot_ws/install/rcutils] Error 2
/root/ros2_riot_ws/install/RIOT/Makefile.include:297: recipe for target 'all' failed
make: *** [all] Error 2
Complete dump available here.
This can be easily reproduced using code from #3 as follows:
docker run -it --privileged micro-ros_test:latest
creating tapbr0
creating tap0
creating tap1
Building application "talker_c" for "native" with MCU "native".
"make" -C /root/ros2_riot_ws/install/RIOT/pkg/micro-ecc
rm -Rf /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc
mkdir -p /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc
/root/ros2_riot_ws/install/RIOT/dist/tools/git/git-cache clone "https://github.com/kmackay/micro-ecc.git" "b6c0cdbe7d20af48b0c2a909a66ff00b093d1542" "/root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc"
Cloning into '/root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc'...
remote: Counting objects: 1086, done.
remote: Total 1086 (delta 0), reused 0 (delta 0), pack-reused 1086
Receiving objects: 100% (1086/1086), 647.95 KiB | 191.00 KiB/s, done.
Resolving deltas: 100% (637/637), done.
Checking connectivity... done.
HEAD is now at b6c0cdb... Add functions to get the private/public key size for a curve (#73)
touch /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc/.git-downloaded
git -C /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc checkout -f b6c0cdbe7d20af48b0c2a909a66ff00b093d1542
HEAD is now at b6c0cdb... Add functions to get the private/public key size for a curve (#73)
git -C /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc am --ignore-whitespace "/root/ros2_riot_ws/install/RIOT/pkg/micro-ecc"/patches/*.patch
Applying: Add RIOT Makefile
Applying: Include RIOT Hardware RNG interface
Applying: Silence warning of unused variable
touch /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc/.git-patched
make -C /root/ros2_riot_ws/install/talker_c/bin/pkg/native/micro-ecc
...
/root/ros2_riot_ws/install/std_msgs/std_msgs__rosidl_typesupport_cbor/u_int8_multi_array__type_support.c:108:51: note: in expansion of macro ‘rosidl_typesupport_cbor’
ROSIDL_TYPESUPPORT_INTERFACE__MESSAGE_SYMBOL_NAME(rosidl_typesupport_cbor, std_msgs, msg, UInt8MultiArray)() {
^
text data bss dec hex filename
163093 1208 74796 239097 3a5f9 /root/ros2_riot_ws/install/talker_c/bin/native/talker_c.elf
/root/ros2_riot_ws/install/talker_c/bin/native/talker_c.elf tap0
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2016.07-devel-3223-g27c86-fca4d54ce069-HEAD)
Publishing: 'Hello World: 1'
Publishing: 'Hello World: 2'
Publishing: 'Hello World: 3'
...
Victor@iMac-de-Victor:~/riot-ros2$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fca4d54ce069 micro-ros_test:latest "/entrypoint.sh bash" About a minute ago Up About a minute determined_torvalds
Victor@iMac-de-Victor:~/riot-ros2$ docker exec -it fca4d54ce069 bash
root@fca4d54ce069:~# cd ros2_riot_ws/install/listener_c/
root@fca4d54ce069:~/ros2_riot_ws/install/listener_c# ls
Makefile Makefile.include main.c
root@fca4d54ce069:~/ros2_riot_ws/install/listener_c# make BOARD=samr21-xpro
Building application "listener_c" for "samr21-xpro" with MCU "samd21".
"make" -C /root/ros2_riot_ws/install/RIOT/pkg/micro-ecc
rm -Rf /root/ros2_riot_ws/install/listener_c/bin/pkg/samr21-xpro/micro-ecc
mkdir -p /root/ros2_riot_ws/install/listener_c/bin/pkg/samr21-xpro/micro-ecc
...
/root/ros2_riot_ws/install/rcutils/time_unix.c:42:4: error: #error no monotonic clock function available
# error no monotonic clock function available
^~~~~
/root/ros2_riot_ws/install/rcutils/time_unix.c: In function 'rcutils_system_time_now':
/root/ros2_riot_ws/install/rcutils/time_unix.c:65:3: warning: implicit declaration of function 'clock_gettime'; did you mean 'localtime'? [-Wimplicit-function-declaration]
clock_gettime(CLOCK_REALTIME, ×pec_now);
^~~~~~~~~~~~~
localtime
/root/ros2_riot_ws/install/rcutils/time_unix.c: In function 'rcutils_steady_time_now':
/root/ros2_riot_ws/install/rcutils/time_unix.c:96:17: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
clock_gettime(CLOCK_MONOTONIC, ×pec_now);
^~~~~~~~~~~~~~~
/root/ros2_riot_ws/install/rcutils/time_unix.c:96:17: note: each undeclared identifier is reported only once for each function it appears in
/root/ros2_riot_ws/install/RIOT/Makefile.base:81: recipe for target '/root/ros2_riot_ws/install/listener_c/bin/samr21-xpro/rcutils/time_unix.o' failed
make[2]: *** [/root/ros2_riot_ws/install/listener_c/bin/samr21-xpro/rcutils/time_unix.o] Error 1
/root/ros2_riot_ws/install/RIOT/Makefile.base:20: recipe for target 'ALL--/root/ros2_riot_ws/install/rcutils' failed
make[1]: *** [ALL--/root/ros2_riot_ws/install/rcutils] Error 2
/root/ros2_riot_ws/install/RIOT/Makefile.include:297: recipe for target 'all' failed
make: *** [all] Error 2
reaching a similar error.
It seems that there is some memory-related problems on embedded nodes.
The most probable problem is that some heap-allocated memory is not freed.
Hi @astralien3000,
First of all, great job porting ros2 on microcontrollers with RIOT.
Yesterday when I was trying to compile listener_c and talker_c for smar21-xpro I was experimenting the next error
/home/jlamperez/Workspace/riot-ros2/src/rmw/error_handling.c:27:38: error: __emutls_t.__rmw_error_state causes a section type conflict with __rmw_error_state
RMW_THREAD_LOCAL rmw_error_state_t * __rmw_error_state = NULL;
^
/home/jlamperez/Workspace/riot-ros2/src/rmw/error_handling.c:27:38: note: '__rmw_error_state' was declared here
/home/jlamperez/Workspace/riot-ros2/RIOT/Makefile.base:81: recipe for target '/home/jlamperez/Workspace/riot-ros2/examples/talker_c/bin/samr21-xpro/rmw/error_handling.o' failed
make[3]: *** [/home/jlamperez/Workspace/riot-ros2/examples/talker_c/bin/samr21-xpro/rmw/error_handling.o] Error 1
make[3]: Leaving directory '/home/jlamperez/Workspace/riot-ros2/src/rmw'
/home/jlamperez/Workspace/riot-ros2/RIOT/Makefile.base:20: recipe for target 'ALL--/home/jlamperez/Workspace/riot-ros2/src/rmw' failed
make[2]: *** [ALL--/home/jlamperez/Workspace/riot-ros2/src/rmw] Error 2
make[2]: Leaving directory '/home/jlamperez/Workspace/riot-ros2'
/home/jlamperez/Workspace/riot-ros2/RIOT/Makefile.base:20: recipe for target 'ALL--/home/jlamperez/Workspace/riot-ros2' failed
make[1]: *** [ALL--/home/jlamperez/Workspace/riot-ros2] Error 2
make[1]: Leaving directory '/home/jlamperez/Workspace/riot-ros2/examples/talker_c'
/home/jlamperez/Workspace/riot-ros2/examples/talker_c/../../RIOT/Makefile.include:297: recipe for target 'all' failed
make: *** [all] Error 2
The command I used inside riot-ros2/examples/talker_c was
make RMW=rmw_mqtt BOARD=samr21-xpro
Do you know how to solve it to allow me to flash the board?
Thank you for your time.
Jorge
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.