micro-ROS / micro-ROS/micro_ros_arduino

Adding custom message to Teensy micro-ROS using the docker image fails

Open
#1,523 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
576
Forks
146
PR merge metrics
No merged PRs in 30d

Description

## Issue template

- Hardware description: Teensy 4.1
- RTOS: N/A
- Installation type: VM running ubuntu 22.04. ROS2 iron, micro ROS 2.0.7, Arduino IDE 2.2.1, Teensy Board version 1.57.2 (the latest did not work for me). running zsh.
- Version or commit hash: iron

#### Steps to reproduce the issue
Following the procedures: `https://github.com/micro-ROS/micro_ros_arduino/tree/iron#how-to-build-the-precompiled-library` to add a custom message to the system and recompile the library.
I get this step:
`docker run -it --rm -v /home/mgeppert/Arduino/libraries/micro_ros_arduino-2.0.7-iron:/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:iron -p teensy4`

#### Expected behavior
The build to be clean and useable in the Arduino IDE

#### Actual behavior
The image runs to the following point:

```
=== ./control_msgs (git) ===
Cloning into '.'...
find: cannot delete ‘/project/src/’: Directory not empty
Crosscompiled environment: cleaning path
Building firmware for generate_lib platform generic
Using provided meta: /project/extras/library_generation/colcon.meta
Starting >>> rcutils
Starting >>> rosidl_cli
Starting >>> rosidl_typesupport_interface
Starting >>> microcdr
Starting >>> rmw_implementation_cmake
Starting >>> tracetools
Starting >>> tracetools_trace
Starting >>> test_interface_files
--- stderr: microcdr
CMake Error at cmake/SuperBuild.cmake:19 (enable_language):
The CMAKE_C_COMPILER:
/uros_ws/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
CMakeLists.txt:54 (include)
---
Failed <<< microcdr [0.51s, exited with code 1]
Aborted <<< rosidl_cli [0.53s]
Aborted <<< tracetools_trace [0.49s]
Aborted <<< rcutils [0.55s]
Aborted <<< tracetools [0.49s]
Aborted <<< rmw_implementation_cmake [0.65s]
Aborted <<< rosidl_typesupport_interface [0.68s]
Aborted <<< test_interface_files [0.80s]

Summary: 0 packages finished [1.28s]
1 package failed: microcdr
7 packages aborted: rcutils rmw_implementation_cmake rosidl_cli rosidl_typesupport_interface test_interface_files tracetools tracetools_trace
3 packages had stderr output: microcdr rcutils tracetools
70 packages not processed
[ros2run]: Process exited with failure 1
find: ‘firmware/build/include/’: No such file or directory
cp: cannot stat 'firmware/build/include/*': No such file or directory
cp: cannot stat 'firmware/build/libmicroros.a': No such file or directory
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
rsync is already the newest version (3.2.7-0ubuntu0.22.04.2).
0 upgraded, 0 newly installed, 0 to remove and 191 not upgraded.
rsync: [sender] change_dir "/project/src/action_msgs/action_msgs" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
rsync: [sender] change_dir "/project/src/actionlib_msgs/actionlib_msgs" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
...`
```

#### Additional information
This is my first experience with Docker and don't know how to find out what it is trying to do.
Prior to creating the custom messages things where working well. So the static libraries seem to work well for what I was testing.
The Host ROS Agent sees the new message correctly and compiled just fine.

I have tried to run the docker command both as non sudo and sudo. I even sudo su and tried to run it. Same errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented “How to build the precompiled library” procedure and reproduce the Docker command for `teensy4`. Inspect why `/uros_ws/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc` is unavailable and why `/project/src/` is incomplete. Done means the custom-message build completes and produces `firmware/build/include/` and `firmware/build/libmicroros.a` for Arduino IDE use.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, c, docker
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.