Synapticon Package Installation
OPTION 1: Installing from source
Create a ROS2 workspace:
mkdir -p ~/ros2_ws/src cd ~/ros2_ws/srcClone the Synapticon package:
git clone https://github.com/synapticon/synapticon_ros2_controlAfter cloning it, you need to set up the ethernet interface. To do so, first execute
ifconfig
and remember the interface name.After that, replace the
eno0
with your ethernet interface in/home/YOUR_USER/ros2_ws/src/synapticon_ros2_control/src/ torque_control_executable.cpp
and/home/YOUR_USER/ros2_ws/src/synapticon_ros2_control/description/ros2_control/ single_dof.ros2_control.xacro
and/home/YOUR_USER/ros2_ws/src/synapticon_ros2_control/description/ros2_control/ two_dof.ros2_control.xacro
. Alternatively, you can do it with commands:sed -i "s/eno0/YOUR_ETHERNET_INTERFACE/g" /home/USER/ros2_ws/src/synapticon_ros2_control/src/torque_control_executable.cpp sed -i "s/eno0/YOUR_ETHERNET_INTERFACE/g" /home/USER/ros2_ws/src/synapticon_ros2_control/description/ros2_control/single_dof.ros2_control.xacro sed -i "s/eno0/YOUR_ETHERNET_INTERFACE/g" /home/USER/ros2_ws/src/synapticon_ros2_control/description/ros2_control/two_dof.ros2_control.xacroInstall build tools:
sudo apt install python3-colcon-common-extensionsBuild the package:
cd ~/ros2_ws rosdep install --from-paths src -y --ignore-src colcon buildAdditionally, you can source the workspace by adding the following line to the
/home/USER/.bashrc
file, but above the line where you sourced the ROS installation (above this line:source /opt/ros/humble/setup.bash
):source /home/USER/ros2_ws/install/setup.bash
OPTION 2: Binary installation
If needed, add the ROS repository (this is done only once):
sudo apt install software-properties-common sudo add-apt-repository universe sudo apt updateInstall Synapticon package:
sudo apt install ros-humble-synapticon-ros2-controlMake sure your rosdep is initialized and updated:
sudo rosdep init rosdep updateInstall its dependencies:
rosdep install synapticon_ros2_controlThe package will get installed to
/opt/ros/humble/share/synapticon_ros2_control/
.
VERIFICATION
To check if the master could be run and if the slaves are found, in the container terminal execute the following. If you installed from source:
sudo ./home/YOUR_USER/ros2_ws/install/synapticon_ros2_control/bin/torque_control_executable
or if you installed using binary installation:
sudo ./opt/ros/humble/share/synapticon_ros2_control/bin/torque_control_executable
Before running other scripts, stop this one by CTRL+C (or wait, it will shutdown automatically after a while).