ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How do I access the source of Mimick that mimick_vendor's cmake file references in order to edit Mimick's CMake file to give it arm7l compatability

asked 2020-10-29 20:01:28 -0600

rydb gravatar image

updated 2020-11-04 12:16:43 -0600

I am trying to get ROS2 to work on the raspberry pi 4 by building it from source, but this one library seems to be the ONLY thing that refuses to build when building from source for raspian. The ubuntu 20.04 pi image has horrible Pi compatiability and im not sure if it even works with peripherals. The only way ROS2 is going to work properly with all pi functionality in tack is with Raspian.

EDIT: I've done a bit of debugging on this issue and have narrowed down the problem to the ROS2 version of Mimick(https://github.com/ros2/Mimick) being in built to throw an error on untested archs. According to https://github.com/Snaipe/Mimick/issu... there is a workaround to allow Mimick to allow arm7l architectures but the ROS2 source does not seem to have a Mimick source folder I can locate, and the only references to its location are in mimick_vendor's CMake file:

build_mimick()

ament_export_libraries(mimick)
ament_export_dependencies(mimick)

How do I access the source of the mimick library that mimick_vendor uses during compile time so I can append it with a workaround to give it arm7l compatability?

edit retag flag offensive close merge delete

Comments

mimick_vendor brings in a dependency which is AFAIK only used during tests. If you don't care about tests, you could disable building them and you would probably not even need mimick_vendor.

That's not really a solution of course, more of a work-around.

gvdhoorn gravatar image gvdhoorn  ( 2020-10-30 06:15:16 -0600 )edit

The problem though is that not building it breaks rcutils and alot of important packages depend on rcutils.

rydb gravatar image rydb  ( 2020-10-30 11:49:47 -0600 )edit

If you disable testing for rcutils (and other dependants) I would expect mimick_vendor to no longer be needed.

gvdhoorn gravatar image gvdhoorn  ( 2020-10-30 12:28:57 -0600 )edit

How do I do that?

rydb gravatar image rydb  ( 2020-10-30 12:55:18 -0600 )edit
gvdhoorn gravatar image gvdhoorn  ( 2020-10-31 09:41:00 -0600 )edit

Still breaks with the same error with the following command: colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF

rydb gravatar image rydb  ( 2020-11-01 11:56:38 -0600 )edit

I want to know if my file haven't micick_vendor config.camke, how should I do?

sinceaway gravatar image sinceaway  ( 2023-03-23 07:50:41 -0600 )edit

I only vaguely remember the problem I had, but if I remember correctly, the main thing is not checking for mimick vendor, its also deleting any rendering related packages before building ros2 from source. (rviz2, ogre, etc...) visualization of ros2 should be done off board and that is what I think was requiring mimick_vendor

rydb gravatar image rydb  ( 2023-03-24 13:23:43 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-11-06 15:57:15 -0600

rydb gravatar image

updated 2020-11-06 16:03:47 -0600

I solved the problem throughout the week. The problem of the Pi 4 not compiling for ros2 was actually two problems:

-. Rviz is broken on the pi 4 and will probably not compile due to missing atomic functions. You will have to delete it from the src in order to compile ROS2. What ever Rviz functionality you need will need to be run on a different computer that can run it.

-. The ros2/mimick library that mimick_vendor vendor was missing the ability to detect arm7l, the architecture the pi uses on the 32bit setting, and using a workaround on the snaipe issue's page, I added arm7l detection to the cmake file of ROS2 mimick and now it works. Until the pull request is accepted, replace the mimick_vendor CMakeLists.txt file with mine at https://github.com/rydb/Mimick/blob/r...

Edit: I built ros2 with the following command: colcon build --symlink-install --cmake-args "-DCMAKE_SHARED_LINKER_FLAGS='-latomic'" "-DCMAKE_EXE_LINKER_FLAGS='-latomic'"^C

edit flag offensive delete link more

Comments

hey! thanks for your answer. I tried to follow your steps. mimick_vendor builds with no issue on a BeagleBone Blue too. However, rcutils still throws an error:

Starting >>> rcutils

--- stderr: rcutils
CMake Error at CMakeLists.txt:185 (find_package): By not providing "Findmimick_vendor.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "mimick_vendor", but CMake did not find one.

Could not find a package configuration file provided by "mimick_vendor" with any of the following names:

mimick_vendorConfig.cmake
mimick_vendor-config.cmake

Add the installation prefix of "mimick_vendor" to CMAKE_PREFIX_PATH or set "mimick_vendor_DIR" to a directory containing one of the above files. If "mimick_vendor" provides a separate development package or SDK, be sure it has been installed.


Failed <<< rcutils [8.11s, exited with code 1]

Any step missing?

anthares gravatar image anthares  ( 2020-11-23 14:54:02 -0600 )edit

Sorry I didn't check ros forums for a while, im thinking your mimick_vendor installation build failed. Find out what architecutre your beagle bone is, and try adding its architecture to the list of accepted architectures, clone my mimick pull, then edit that mimick's cmake to accept your beagle bone's architecture. Then, have mimick_vnedor vend your modified mimick instead of the ros2 one.

rydb gravatar image rydb  ( 2020-12-07 15:13:04 -0600 )edit
0

answered 2021-01-29 14:07:14 -0600

achmad_fathoni gravatar image

This is cleaner solution, just run this in the folder where build folder exist

sed -i 's/(ARM32 "^(arm|ARM|A)(32)?$")/(ARM32 "^(arm|ARM|A)(32|v7l)?$")/' build/mimick_vendor/mimick-ext-prefix/src/mimick-ext/CMakeLists.txt

Credit: https://medium.com/swlh/raspberry-pi-...

edit flag offensive delete link more

Comments

Oh nice, I haven't tried this before but how does it get around visual libraries like rviz2 breaking the install? When I installed it, I had to remove the entire rviz2 package.

rydb gravatar image rydb  ( 2021-01-29 14:36:11 -0600 )edit

Sorry I never put visualizer software in arm machine, to get base installation without visualizer software use something like rosinstall_generator --deps --rosdistro foxy ros_base > foxy_base.repos

achmad_fathoni gravatar image achmad_fathoni  ( 2021-01-29 14:39:11 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-29 20:01:28 -0600

Seen: 831 times

Last updated: Jan 29 '21