ros2-for-arm / ros2

Contains the manifest which inherits ros2/ros2 and arm specific for ros2
Apache License 2.0
44 stars 14 forks source link

Update for Bouncy release #5

Closed ghost closed 6 years ago

ghost commented 6 years ago

The current documentation does not work for the latest release of ROS2 (bouncy). In particular, it needs to be updated to use Colcon as the build system and to provide libyaml dependency.

I'll update this issue once I've got a working version.

pokitoz commented 6 years ago

Great! Thanks. I also had a look once the released went out. But could not find time to fix it

For sure, the build command should be updated to: colcon build --symlink-install --cmake-force-configure --cmake-args -DCMAKE_TOOLCHAIN_FILE=pwd/aarch64_toolchainfile.cmake -DBUILD_TESTING=OFF

And the package ignore should be updated:


sed -e '/py/ s/^#*/#/' -i src/ros2/rosidl_typesupport/rosidl_default_generators/CMakeLists.txt
sed -i -r 's/<build(.+?py.+?)/<\!\-\-build\1\-\->/' src/ros2/rosidl_typesupport/rosidl_default_generators/package.xml

touch \
  src/ros/resource_retriever/COLCON_IGNORE \
  src/ros2/demos/COLCON_IGNORE \
  src/ros2/examples/rclpy/COLCON_IGNORE \
  src/ros2/geometry2/COLCON_IGNORE \
  src/ros2/kdl_parser/COLCON_IGNORE \
  src/ros2/orocos_kinematics_dynamics/COLCON_IGNORE \
  src/ros2/rclpy/COLCON_IGNORE \
  src/ros2/rmw_connext/COLCON_IGNORE \
  src/ros2/rmw_opensplice/COLCON_IGNORE \
  src/ros2/robot_state_publisher/COLCON_IGNORE \
  src/ros2/ros1_bridge/COLCON_IGNORE \
  src/ros2/rviz/COLCON_IGNORE \
  src/ros2/system_tests/COLCON_IGNORE \
  src/ros2/urdf/COLCON_IGNORE \
  src/ros2/urdfdom/COLCON_IGNORE 
  src/ros/urdfdom_headers/COLCON_IGNORE
  src/ros-perception/laser_geometry/COLCON_IGNORE
  src/ros2/rosidl_python/COLCON_IGNORE```
ghost commented 6 years ago

Here's a cut-down version of the script I've got working: https://gist.github.com/johnmarkwayve/b1045dc5c08dd009f872ab054d4406ae

(the full script has irrelevant details about my exact project, but I hope this will work for others too)

In particular, I had some trouble with libyaml. I suspect that certain bouncy packages haven't properly declared their yaml dependencies, causing my cmake to go looking for a system-wide libyaml installation (not fun for cross compilation) rather than using the libyaml_vendor one provided.

pokitoz commented 6 years ago

Thanks, I quickly had a look at it. It leads to the same issue I have with my configuration when trying to compile the examples. During the linking stage I have the following error:

/work/Documents/aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.1.1/../../../../aarch64-linux-gnu/bin/ld: warning: libPocoFoundation.so.50, needed by /work/ROS2_Bouncy/ros2_ws/install/rosidl_typesupport_cpp/lib/librosidl_typesupport_cpp.so, not found (try using -rpath or -rpath-link)
/work/Documents/aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.1.1/../../../../aarch64-linux-gnu/bin/ld: warning: libyaml.so, needed by /work/ROS2_Bouncy/ros2_ws/install/rcl_yaml_param_parser/lib/librcl_yaml_param_parser.so, not found (try using -rpath or -rpath-link)
/work/ROS2_Bouncy/ros2_ws/install/rcl_yaml_param_parser/lib/librcl_yaml_param_parser.so: undefined reference to `yaml_event_delete'
...

I will try to have a look at this and hopefully update the wiki.

pokitoz commented 6 years ago

I don't have the issue with libyaml missing. Maybe a patch has been done in the meantime. I solved my above issues by adding:

set(PATH_POCO_LIB "${CMAKE_CURRENT_LIST_DIR}/build/poco_vendor/poco_external_project_install/lib/")
set(PATH_YAML_LIB "${CMAKE_CURRENT_LIST_DIR}/build/libyaml_vendor/libyaml_install/lib/")
set(CMAKE_BUILD_RPATH "${PATH_POCO_LIB};${PATH_YAML_LIB}")

to the toolchain file

pokitoz commented 6 years ago

The wiki as just been updated to cross-compile the Bouncy release ! https://github.com/ros2-for-arm/ros2/wiki/ROS2-on-arm-architecture

I will close this issue, feel free to re-open if needed.

mikaelarguedas commented 6 years ago

We recommend using AMENT_IGNORE files to ignore packages as these files are currently known by all ROS 2 build tools (ament_tools and colcon). Using COLCON_IGNORE files means that it will not be possible to compile this workspace with ament_tools anymore.