Just a Test Library for the ROS 2 Dependencies on MacOS Ventura
Here ~/ros2_rolling is the location of my ROS 2 source install, so swap that out with whatever you're using, starting within that location.
Before building run the following command:
brew uninstall orocos-kdl
cd .. && rm -rf ros2_rolling && mkdir -p ~/ros2_rolling/src && cd ~/ros2_rolling && vcs import --input https://raw.githubusercontent.com/CursedRock17/RosDepends/main/ros2.repos src && cd ~/ros2_rolling/ && colcon build --symlink-install --packages-skip-by-dep python_qt_binding --event-handlers console_direct+
Building rqt
:
colcon build --symlink-install --packages-ignore qt_gui_cpp rqt_gui_cpp
Then run:
. ~/ros2_rolling/install/setup.zsh
When building Additional Ros tools:
brew install llvm@{wanted version}
sudo ln -s "$(brew --prefix llvm@{wanted version})/bin/clang-format" "/usr/local/bin/clang-format-{wanted version}"
Continious Integration (CI)
- Setup Github actions with Act or
- Use Colcon to build the industrial_ci pipeline
- Build with ros2 run
-- Prerequistes:
- brew install coreutils
- brew install bash
-
Create a Workspace as per Colcon's guide. It can be cleared so that we just have the src file system. but instead of an example library clone in industrial_ci on the master branch.
-
Next insert your wanted testing repository into
src
so you can dogit clone https://gitrepo.git -b main
or you can do a copy (More Likely) of a local repository for constant testing withcp -R old_location workspace/src
-
In order to use industrial_ci we have to make some changes for OSX specifically
scripts/run_ci
needs to usegreadlink
instead ofreadlink
-
Now we can install our testing software :
colcon build --packages-select industrial_ci
-
Then we need to actually setup the CI specific to a package for this example I'm using moveit2 seen from their docs: https://moveit.ros.org/documentation/contributing/continuous_integration/
-
I run a small script of :
ros2 run industrial_ci run_ci ~/workspace_location/src/package_to_test
with my locations and packages subbed in, to which we should run into some errors during the docker pull:line 199: 1679972928N: value too great for base (error token is "1679972928N")
/moveit2_ws/install/industrial_ci/share/industrial_ci/src/run.sh: No such file or directory
Solve this by removin all instances of%N
, whcih should 2, in the run_sh script. -
We now need to use an image that fits to arm64 instead of the linux/amd64 listed on dockerhub
We need to clone the following packages from source into our repo: angles, eigen_stl_containers, fcl, geometric_shapes, launch_param_builder, object_recognition_msgs, octomap, octomap_msgs, random_numbers, rosparam_shortcuts, ruckig, srdfdom
- We need to remove all
std::tr1::unordered_map
andstd::tr1::unordered_set
definitions from the code by simply removing tr1 and moving as usual - May need to add C++14 to files that cannot run boost due to version problems so :
if (NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANRDARD_REQUIRED TRUE)
endif()
- Apple Clang doesn't support all features such as, but not limited to :
- Floating Point Values in std::from_chars : Must become integers
- Need to include glog via
glog::glog
- Need to remove some boost definitions like
signals
which is no longer a package - Ros Install with sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3.11
- Replace condattr_setclock with condattr_setpthread
- Remove the @ in gencpp/scripts/msg.h.template in the const char* value() return