Installing Choreonoid Main Body¶
This section explains how to install Choreonoid that integrates with ROS 2.
Choreonoid Main Body Installation Methods¶
For installing Choreonoid main body that integrates with ROS 2, you have the following options:
Install independently of ROS 2, using the standard installation method
Install from packages
Build and install from source code
Install as a ROS 2 package
Standard Installation Method¶
If you already have Choreonoid main body installed, using it is simple, reliable, and recommended. However, please note that this method became available from Choreonoid main body version 2.3.0 onwards.
The simplest installation method for Choreonoid main body is option 1-A above: package installation.
If necessary, you may also perform option 1-B: build and install from source code. In that case, make sure to also perform the post-build installation work. Since the installation path needs to be accessible, ensure that the setup.bash script is also executed reliably.
Registering Choreonoid Installed via Standard Method with rosdep¶
When you install Choreonoid main body using the standard installation method, registering it with rosdep so that rosdep can recognize Choreonoid will enable proper resolution of dependencies from other ROS 2 packages.
Register with rosdep using the following procedure.
First, create a rosdep source list file:
echo "yaml file:///etc/ros/rosdep/choreonoid.yaml" | sudo tee /etc/ros/rosdep/sources.list.d/50-choreonoid.list
Next, create a rule definition file for Choreonoid.
For package installation:
sudo tee /etc/ros/rosdep/choreonoid.yaml << EOF
choreonoid:
ubuntu: choreonoid
EOF
For installation built from source code:
sudo tee /etc/ros/rosdep/choreonoid.yaml << EOF
choreonoid:
ubuntu:
source:
uri: 'file:///usr/local'
EOF
Change the /usr/local part above to match your actual Choreonoid installation path.
After creating the configuration files, update the rosdep database:
rosdep update
Once the update is complete, you can verify with the following command:
rosdep resolve choreonoid
This enables rosdep to recognize Choreonoid properly even when other ROS 2 packages specify Choreonoid as a dependency package in their package.xml.
Note
By performing this configuration, when you run the rosdep install command, it will recognize that Choreonoid is already installed, allowing you to avoid unnecessary reinstallation or errors.
Installing as a ROS 2 Package¶
This method was used previously. As explained in the next Building Choreonoid-related Packages, Choreonoid main body is also built from source in the ROS 2 workspace.
If you don’t have a particular need to use this method, please use the “Standard Installation Method”.
Note that when installing with this method, since Choreonoid exists as a package within the ROS 2 workspace, registration with rosdep is not necessary.
Also, when using this method, if you already have Choreonoid installed, it may interfere with the existing installation. Be careful with configuration to avoid interference in paths for executable files, shared libraries, CMake, include files, etc. For details, please refer to Reference: Notes When Building Choreonoid Main Body on the Workspace.