micro-ros / nuttx_apps Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
When I enable the telemetry app, compilation fails with the following error:
make[2]: Entering directory '/home/lui3si/src/ros2_ws/src/apps/examples/telemetry'
CC: telemetry_main.c
telemetry_main.c: In function ‘telemetry_main’:
telemetry_main.c:134:14: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
fd_sensor = open("/dev/ina219", O_RDWR);
^
telemetry_main.c:149:37: error: invalid application of ‘sizeof’ to incomplete type ‘struct ina219_s’
read(fd_sensor, &sample, sizeof(sample));
^
telemetry_main.c:149:11: warning: passing argument 1 of ‘read’ makes integer from pointer without a cast [-Wint-conversion]
read(fd_sensor, &sample, sizeof(sample));
^
In file included from /home/lui3si/src/ros2_ws/src/NuttX/include/pthread.h:51:0,
from /home/lui3si/src/ros2_ws/src/NuttX/include/nuttx/sched.h:50,
from /home/lui3si/src/ros2_ws/src/NuttX/include/sched.h:48,
from /home/lui3si/src/ros2_ws/src/NuttX/include/stdio.h:47,
from telemetry_main.c:41:
/home/lui3si/src/ros2_ws/src/NuttX/include/unistd.h:163:9: note: expected ‘int’ but argument is of type ‘FILE * {aka struct file_struct *}’
ssize_t read(int fd, FAR void *buf, size_t nbytes);
^
telemetry_main.c:172:6: error: invalid use of undefined type ‘struct ina219_s’
sample.voltage,sample.current,cpuload_buf,i);
^
telemetry_main.c:172:6: error: invalid use of undefined type ‘struct ina219_s’
telemetry_main.c:196:10: warning: passing argument 1 of ‘close’ makes integer from pointer without a cast [-Wint-conversion]
close(fd_sensor);
^
In file included from /home/lui3si/src/ros2_ws/src/NuttX/include/pthread.h:51:0,
from /home/lui3si/src/ros2_ws/src/NuttX/include/nuttx/sched.h:50,
from /home/lui3si/src/ros2_ws/src/NuttX/include/sched.h:48,
from /home/lui3si/src/ros2_ws/src/NuttX/include/stdio.h:47,
from telemetry_main.c:41:
/home/lui3si/src/ros2_ws/src/NuttX/include/unistd.h:158:5: note: expected ‘int’ but argument is of type ‘FILE * {aka struct file_struct *}’
int close(int fd);
^
/home/lui3si/src/ros2_ws/src/apps/Application.mk:89: recipe for target 'telemetry_main.o' failed
make[2]: *** [telemetry_main.o] Error 1
make[2]: Leaving directory '/home/lui3si/src/ros2_ws/src/apps/examples/telemetry'
Makefile:93: recipe for target 'examples/telemetry_all' failed
make[1]: *** [examples/telemetry_all] Error 2
make[1]: Leaving directory '/home/lui3si/src/ros2_ws/src/apps'
LibTargets.mk:174: recipe for target '../apps/libapps.a' failed
make: *** [../apps/libapps.a] Error 2
I'm trying to use the uros
defconfing with serial communications instead of ethernet. To do so, I went to the menuconfig and did the next modification:
Application configuration->micro-ROS->Transport, and set Serial Transport.
When I try to build it, with micro-ROS build system using the next command:
ros2 run micro_ros_setup build_firmware.sh
I get the next error:
juan@juan-GL65-9SEK:~/uros_pinpong$ ros2 run micro_ros_setup build_firmware.sh
Crosscompiled environment: cleaning path
Building firmware for nuttx platform olimex-stm32-e407
LN: include/arch to arch/arm/include
LN: include/arch/board to /home/juan/uros_pinpong/firmware/NuttX/configs/olimex-stm32-e407/include
LN: include/arch/chip to arch/arm/include/stm32
LN: arch/arm/src/board to /home/juan/uros_pinpong/firmware/NuttX/configs/olimex-stm32-e407/src
LN: arch/arm/src/chip to arch/arm/src/stm32
make[1]: Entering directory '/home/juan/uros_pinpong/firmware/NuttX/configs'
make[1]: Leaving directory '/home/juan/uros_pinpong/firmware/NuttX/configs'
make[1]: Entering directory '/home/juan/uros_pinpong/firmware/apps'
make[2]: Entering directory '/home/juan/uros_pinpong/firmware/apps/platform'
LN: platform/board to /home/juan/uros_pinpong/firmware/apps/platform/dummy
make[2]: Leaving directory '/home/juan/uros_pinpong/firmware/apps/platform'
make[1]: Leaving directory '/home/juan/uros_pinpong/firmware/apps'
make[1]: Entering directory '/home/juan/uros_pinpong/firmware/NuttX/configs'
make[2]: Entering directory '/home/juan/uros_pinpong/firmware/NuttX/configs/olimex-stm32-e407/src'
make[2]: Nothing to be done for 'context'.
make[2]: Leaving directory '/home/juan/uros_pinpong/firmware/NuttX/configs/olimex-stm32-e407/src'
make[1]: Leaving directory '/home/juan/uros_pinpong/firmware/NuttX/configs'
make[1]: Entering directory '/home/juan/uros_pinpong/firmware/apps'
make[2]: Entering directory '/home/juan/uros_pinpong/firmware/apps/builtin'
make[3]: Entering directory '/home/juan/uros_pinpong/firmware/apps/builtin/registry'
make[3]: Leaving directory '/home/juan/uros_pinpong/firmware/apps/builtin/registry'
make[2]: Leaving directory '/home/juan/uros_pinpong/firmware/apps/builtin'
make[2]: Entering directory '/home/juan/uros_pinpong/firmware/apps'
make[3]: Entering directory '/home/juan/uros_pinpong/firmware/apps/uros'
cat arm_toolchain.cmake.in | \
sed "s/@CROSSDEV@/arm-none-eabi-/g" | \
sed "s/@NUTTX_TOPDIR@/\/home\/juan\/uros_pinpong\/firmware\/NuttX/g" |\
sed "s/@ARCH_CPU_FLAGS@/\"-mcpu=cortex-m4 -mthumb -mfloat-abi=soft\"/g" |\
sed "s/@ARCH_OPT_FLAGS@/\"-g\"/g" \
> arm_toolchain.cmake
cat rmw_config.meta.in | \
sed "s/@MAX_NODES@/2/g" | \
sed "s/@MAX_PUBLISHERS@/2/g" | \
sed "s/@MAX_SUBSCRIPTIONS@/1/g" | \
sed "s/@MAX_SERVICES@/1/g" | \
sed "s/@MAX_CLIENTS@/1/g" | \
sed "s/@MAX_HISTORY@/2/g" | \
sed "s/@TRANSPORT@/serial/g" | \
sed "s/@AGENT_IP@//g" | \
sed "s/@AGENT_PORT@//g" |\
sed "s/@SERIAL_PORT@/"/dev/ttyS1"/g" \
> rmw_config.meta
sed: -e expression #1, char 18: unknown option to `s'
Makefile:40: recipe for target 'rmw_config.meta' failed
make[3]: *** [rmw_config.meta] Error 1
make[3]: Leaving directory '/home/juan/uros_pinpong/firmware/apps/uros'
Makefile:106: recipe for target 'uros_context' failed
make[2]: *** [uros_context] Error 2
make[2]: Leaving directory '/home/juan/uros_pinpong/firmware/apps'
Makefile:179: recipe for target 'context_serialize' failed
make[1]: *** [context_serialize] Error 2
make[1]: Leaving directory '/home/juan/uros_pinpong/firmware/apps'
tools/Makefile.unix:345: recipe for target 'context' failed
make: *** [context] Error 2
Note: The name of the folder it doesn't has relation with the defconfig.
Hi folks,
hope all is well! Wanted to check in on the status of NuttX and integration with uROS. I have worked with both Zephyr and FreeRTOS. And I was really interested in the potential of porting over some of the boards I use to NuttX.
Looks like NuttX just release a v10.1 which looks elite: https://bitbucket.org/patacongo/nuttx/src/master/
Let me know definitely defintely would be super cool to have this side fully supported as well!!
Thank you!
Hi,
I try to build nsh for stm32f4discovery board.
Find the attached nsh defconfig file for your review.
The error is as follow.
Please guide me how to make it for STM32F4Discovery Board.
Thank you.
Regards,
Thiha Kyaw
microros_stm32f4
Docker containermake distclean
make apps_distclean
tools/configure.sh configs/olimex-stm32-e407/uros
make
IN: arch/arm/src/libarch.a -> staging/libarch.a
make[1]: Entering directory '/root/NuttX/libs/libxx'
Makefile:80: uClibc++/Make.defs: No such file or directory
make[1]: *** No rule to make target 'uClibc++/Make.defs'. Stop.
make[1]: Leaving directory '/root/NuttX/libs/libxx'
tools/LibTargets.mk:180: recipe for target 'libs/libxx/libxx.a' failed
make: *** [libs/libxx/libxx.a] Error 2
Created an issue at apache/nuttx#2935
NuttX example for sporadic scheduling in testing/ostest
Test setup:
Observation:
Problem description
I came to the conclusion, that budget enforcement of the NuttX sporadic scheduling only works for one sporadic thread.
For real applications, I would like to use multiple threads with sporadic scheduling.
With the decision to no longer support rclc, we need to update the publisher and subscriber examples.
Could we rename this repo as nuttx_apps in order to follow the same philosophy as in FreeRTOS and Zephyr?
Hi,
@jamoralp @pablogs9 @ralph-lange
I am running into problems for an application with multiple threads for NuttX and Olimex board. You know, that I try to get the multi-threaded executor for NuttX running.
What I have done so far:
When I try to run it on Olimex board, the threads start, but there is no progress in the main thread (aka executor).
The application uses two subscriptions and two publishers and one executor. So I don't need to change anything in the micro-ros configuration, right?
nuttx_apps/examples/uros_rbs/main_rbs.c
Line 216 in 0746a00
The processing just stops after calling rcl_wait
https://github.com/micro-ROS/rclc/blob/7a5d0d254f4dbf744b04f46a14fd05de061bbeb3/rclc/src/rclc/executor.c#L1559
However, rcl_wait might not be the problem - maybe something goes wrong with the other threads and then everything stops.
I configured also the priorities:
I also noticed that sometimes the green light on the Olimex board starts blinking. after that not output is seen in the nsh shell (via screen terminal). What does that mean? Something really went wrong?
I wrote a simple program a main thread and two worker threads, which seems to works fine (without micro-ros functions used).
Is there anything regarding STACKSIZE I have to consider? Currently it is set to 65000 in the Makefile
When spawning threads (pthread_create), then no stack size is configured. What is the default stack size. Is it maybe too small, too large?
rclc executor:
https://github.com/micro-ROS/rclc/tree/feature/rbs-nuttx
application on olimex:
https://github.com/micro-ROS/nuttx_apps/tree/feature/foxy_rbs_executor_demo/examples/uros_rbs
It would be great if we could have an example working with micro-RTPS (for now) and micro-ROS (in the future) out of the box.
It would also be great if this would run with the simulator :-)
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.