lucasw / ros_from_src

Build ros from source without using a PPA in a github action. Probably just copy what archlinux is doing. See also https://github.com/ros-o/ros-o
BSD 3-Clause "New" or "Revised" License
102 stars 16 forks source link

Build moveit from source in 22.04/23.04 #36

Open lucasw opened 10 months ago

lucasw commented 10 months ago

https://github.com/ros-planning/moveit

Packages needs beyond what ros_from_src already has installed:

rosdep install --from-paths src --ignore-src -r -s
...
  sudo -H apt-get install libfcl-dev
  sudo -H apt-get install libogre-1.9-dev
  sudo -H apt-get install python3-pyassimp
  sudo -H apt-get install libomp-dev
  sudo -H apt-get install liburdfdom-tools

-> But don't do the libogre-1.9-dev install, 1.12 is fine and removing it will break already built rviz and others

lucasw commented 10 months ago
catkin build -j1 moveit_core
...
CMake Error at /usr/lib/cmake/pybind11/pybind11NewTools.cmake:189 (python3_add_library):
  Unknown CMake command "python3_add_library".

https://github.com/pybind/pybind11/issues/3996

-> move pybind11_catkin up in the moveit_core CMakeLists.txt find_package

https://github.com/lucasw/moveit/tree/pybind_find_order

https://github.com/ros-planning/moveit/pull/3552

lucasw commented 10 months ago
Errors     << moveit_core:make /home/lucasw/ros/ros1_rse/logs/moveit_core/build.make.001.log                                                                                                                                        
In file included from /home/lucasw/ros/ros1_rse/src/moveit_all/moveit/moveit_core/trajectory_processing/src/ruckig_traj_smoothing.cpp:40:
/home/lucasw/ros/ros1_rse/src/moveit_all/moveit/moveit_core/trajectory_processing/include/moveit/trajectory_processing/ruckig_traj_smoothing.h:42:10: fatal error: ruckig/ruckig.hpp: No such file or directory
   42 | #include <ruckig/ruckig.hpp>
      |          ^~~~~~~~~~~~~~~~~~~

building ruckig through catkin doesn't install the headers in devel, try building manually

cmake ../src/moveit_all/ruckig/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DEST

no that doesn't install the headers either, it's the same as what catkin installed to devel

Install the project...
-- Install configuration: "Release"
-- Installing: /home/lucasw/other/install/lib/libruckig.so
-- Installing: /home/lucasw/other/install/lib/cmake/ruckig/ruckig-targets.cmake
-- Installing: /home/lucasw/other/install/lib/cmake/ruckig/ruckig-targets-release.cmake
-- Installing: /home/lucasw/other/install/lib/cmake/ruckig/ruckig-config.cmake
-- Installing: /home/lucasw/other/install/lib/cmake/ruckig/ruckig-config-version.cmake
-- Installing: /home/lucasw/other/install/share/ruckig/package.xml

workaround

~/other/install/include$ cp ~/ros/ros1_rse/src/moveit_all/ruckig/include/ruckig -rfupv .
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include
lucasw commented 10 months ago

nlohmann-json3-dev -> json/json.hpp?

No need the ruckig third_party includes- copy the include/ruckig dir and third_party/* to a single location and set that in cmake

cp ~/other/install/include/ruckig$ cp ~/ros/ros1_rse/src/moveit_all/ruckig/include/ruckig -rfupv .
cp ~/other/install/include/ruckig$ cp ~/ros/ros1_rse/src/moveit_all/ruckig/third_party/* -rfupv .
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -Wno-deprecated -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$DEST/include/ruckig
lucasw commented 10 months ago
sudo apt install libompl-dev
lucasw commented 10 months ago
pip install eigenpy

No that doesn't work, git clone it into workspace

https://github.com/stack-of-tasks/eigenpy

lucasw commented 10 months ago
repositories:
  eigenpy:
    type: git
    url: https://github.com/stack-of-tasks/eigenpy
    version: master
  geometric_shapes:
    type: git
    url: https://github.com/ros-planning/geometric_shapes.git
    version: noetic-devel
  graph_msgs:
    type: git
    url: git@github.com:PickNikRobotics/graph_msgs.git
    version: jade-devel
  moveit:
    type: git
    url: git@github.com:lucasw/moveit.git
    version: pybind_find_order
  moveit_msgs:
    type: git
    url: https://github.com/ros-planning/moveit_msgs.git
    version: master
  moveit_resources:
    type: git
    url: https://github.com/ros-planning/moveit_resources.git
    version: master
  moveit_tutorials:
    type: git
    url: https://github.com/ros-planning/moveit_tutorials.git
    version: master
  moveit_visual_tools:
    type: git
    url: https://github.com/ros-planning/moveit_visual_tools.git
    version: master
  object_recognition_msgs:
    type: git
    url: git@github.com:wg-perception/object_recognition_msgs.git
    version: master
  pybind11_catkin:
    type: git
    url: git@github.com:wxmerkt/pybind11_catkin.git
    version: master
  ruckig:
    type: git
    url: git@github.com:pantor/ruckig.git
    version: main
  rviz_visual_tools:
    type: git
    url: https://github.com/PickNikRobotics/rviz_visual_tools
    version: master
  srdfdom:
    type: git
    url: https://github.com/ros-planning/srdfdom
    version: noetic-devel
  warehouse_ros:
    type: git
    url: git@github.com:ros-planning/warehouse_ros.git
    version: kinetic-devel
v4hn commented 10 months ago

building ruckig through catkin doesn't install the headers in devel, try building manually

cmake ../src/moveit_all/ruckig/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$DEST

https://github.com/pantor/ruckig/pull/178

lucasw commented 10 months ago

@v4hn what about the third_party/json headers? I had to do this

install(DIRECTORY third_party/json DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

https://github.com/lucasw/ruckig/commit/2edf595617687e847e0b30d8776020a498a33d3e

v4hn commented 10 months ago

I always build without the cloud client because I don't see the point in having json rpc interfaces in a library that usually runs on realtime systems on controllers. That dependency was also the reason why the noetic package was(/is?) broken.