Closed anaelle-sw closed 3 years ago
Hello @anaelle-sw I just have tested if I'm able to build the int32_publisher example with main
branch. In fact, it is built in the CI and yesterday morning it has passed.
I'm going to replicate your steps in a clean environment (using the Arduino CLI, I guess that it will work with all tools) and I will come back in a while.
In any case, Rolling is an unstable release, do you have any good reason for using it?
Ok, thank you. I have build micro-ROS yesterday evening by just doing the docker pull
and docker run
steps. And I just have it tried again this morning, but after removing the previous installation.
Yes, for now, Rolling is quite interesting for us because of some features that won't be available on Foxy.
This is a clean installation and builds of the publisher demo using main
for Teensy 3.1/3.2:
https://asciinema.org/a/QBYuYOEdMoAHguv0DMbBhhgb7
I do a couple of tricks here, let me explain:
main
platform_teensy.txt
teensy_post_compile
with a true to avoid the teensy loader being usedI know that this is a bit tricky and you don't need to do all these steps. I have followed what we do in the CI: https://github.com/micro-ROS/micro_ros_arduino/blob/foxy/.github/workflows/ci.yml
Now, I'm going to replicate the step of regenerating the library like you are doing, with:
sudo docker pull microros/micro_ros_arduino_builder:rolling
sudo docker run -it --rm -v $(pwd):/arduino_project microros/micro_ros_arduino_builder:rolling
Are you adding some custom package to the micro-ROS library generation or you are running the
sudo docker run -it --rm -v $(pwd):/arduino_project microros/micro_ros_arduino_builder:rolling
in a clean clone of this repo?
Thanks for your answer, I will try to follow these steps and will let you know. Yes we need custom messages and to change the .meta file. After cloning the repo, this is what I do:
# custom build
cat ~/project_repo/src/.../colcon_lowmem.meta > ~/Arduino/libraries/micro_ros_arduino/extras/library_generation/colcon_lowmem.meta
# custom messages
cp -r ~/project_repo/src/custom_msgs_pkg ~/Arduino/libraries/micro_ros_arduino/extras/library_generation/extra_packages
And then I run docker pull
and docker run
steps
ok, maybe your library building is failing for some reason.
Could you do the following steps?
git clone -b main https://github.com/micro-ROS/micro_ros_arduino
in your library foldergit status
sudo docker run -it --rm -v $(pwd):/arduino_project microros/micro_ros_arduino_builder:rolling
git status
Maybe an error in your meta or in any of your messages is making the build fail. Is possible also to paste here the output of the docker run
command?
Actually, the .meta is the same that I used before for Foxy version! II didn't see that it has some changes for Rolling. I changed this and let you know whether it solves the problem.
First git status
returns:
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: extras/library_generation/colcon_lowmem.meta
Untracked files:
(use "git add <file>..." to include in what will be committed)
extras/library_generation/extra_packages/wyca_msgs/
no changes added to commit (use "git add" and/or "git commit -a")
The library is currently building, it may take a dozen of minutes...
In order to reduce the library building time remember to use -p
to just build the library for your platform.
sudo docker run -it --rm -v $(pwd):/arduino_project microros/micro_ros_arduino_builder:rolling -p teensy32
Regarding the meta, please share it here, we have changed a couple of things this week regarding the transports.
The meta I had before:
{
"names": {
"tracetools": {
"cmake-args": [
"-DTRACETOOLS_DISABLED=ON",
"-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF"
]
},
"rosidl_typesupport": {
"cmake-args": [
"-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON"
]
},
"rcl": {
"cmake-args": [
"-DBUILD_TESTING=OFF",
"-DRCL_COMMAND_LINE_ENABLED=OFF",
"-DRCL_LOGGING_ENABLED=OFF"
]
},
"rcutils": {
"cmake-args": [
"-DENABLE_TESTING=OFF",
"-DRCUTILS_NO_FILESYSTEM=ON",
"-DRCUTILS_NO_THREAD_SUPPORT=ON",
"-DRCUTILS_NO_64_ATOMIC=ON",
"-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
]
},
"microxrcedds_client": {
"cmake-args": [
"-DUCLIENT_PIC=OFF",
"-DUCLIENT_PROFILE_UDP=OFF",
"-DUCLIENT_PROFILE_DISCOVERY=OFF",
"-DUCLIENT_PROFILE_SERIAL=ON",
"-DUCLIENT_EXTERNAL_SERIAL=ON"
]
},
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=1",
"-DRMW_UXRCE_MAX_PUBLISHERS=3",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=2",
"-DRMW_UXRCE_MAX_SERVICES=1",
"-DRMW_UXRCE_MAX_CLIENTS=0",
"-DRMW_UXRCE_MAX_HISTORY=1",
"-DRMW_UXRCE_TRANSPORT=custom_serial"
]
}
}
}
The new one (based on the current version in main branch):
{
"names": {
"tracetools": {
"cmake-args": [
"-DTRACETOOLS_DISABLED=ON",
"-DTRACETOOLS_STATUS_CHECKING_TOOL=OFF"
]
},
"rosidl_typesupport": {
"cmake-args": [
"-DROSIDL_TYPESUPPORT_SINGLE_TYPESUPPORT=ON"
]
},
"rcl": {
"cmake-args": [
"-DBUILD_TESTING=OFF",
"-DRCL_COMMAND_LINE_ENABLED=OFF",
"-DRCL_LOGGING_ENABLED=OFF"
]
},
"rcutils": {
"cmake-args": [
"-DENABLE_TESTING=OFF",
"-DRCUTILS_NO_FILESYSTEM=ON",
"-DRCUTILS_NO_THREAD_SUPPORT=ON",
"-DRCUTILS_NO_64_ATOMIC=ON",
"-DRCUTILS_AVOID_DYNAMIC_ALLOCATION=ON"
]
},
"microxrcedds_client": {
"cmake-args": [
"-DUCLIENT_PIC=OFF",
"-DUCLIENT_PROFILE_UDP=OFF",
"-DUCLIENT_PROFILE_TCP=OFF",
"-DUCLIENT_PROFILE_DISCOVERY=OFF",
"-DUCLIENT_PROFILE_SERIAL=OFF",
"-UCLIENT_PROFILE_STREAM_FRAMING=ON",
"-DUCLIENT_PROFILE_CUSTOM_TRANSPORT=ON"
]
},
"rmw_microxrcedds": {
"cmake-args": [
"-DRMW_UXRCE_MAX_NODES=1",
"-DRMW_UXRCE_MAX_PUBLISHERS=3",
"-DRMW_UXRCE_MAX_SUBSCRIPTIONS=2",
"-DRMW_UXRCE_MAX_SERVICES=1",
"-DRMW_UXRCE_MAX_CLIENTS=0",
"-DRMW_UXRCE_MAX_HISTORY=1",
"-DRMW_UXRCE_TRANSPORT=custom"
]
}
}
}
So, it is entirely my bad, the .ino code builds properly when micro-ROS is built with the correctly updated meta file. Sorry for bothering you because of this mistake. Thanks a lot for helping
Ooook don't worry! Please give us feedback about the Rolling release, you are the only ones using it, as far as I know.
Hi! We are currently trying to migrate our project from ROS2 Foxy to Rolling. The problem is I am not able to build any Arduino code once micro-ROS Rolling is installed.
Setup
Steps to reproduce
I wanted to re-installed micro-ROS from scratch to be sure no Foxy code will be remaining and creating some conflict. So I removed the library installation at
~/Arduino/libraries/micro_ros_arduino
and did this:The build went well. Then I open an example from this repo with Arduino IDE and try to build it.
Issue
The build of the .ino code failed with error
undefined reference
for every rclc function. For instance, when building the publisher example, I got the following errors:I double checked that I was building the example code from the main branch, and that the library installation was complete. Did I made some mistakes switching from Foxy to Rolling? Are some includes missing? Thank you very much for your help!