The Interbotix X-Series Driver provides low-level interfaces to easily control the DYNAMIXEL servos on any Interbotix X-Series Robot.
This package can be used as a standalone C++ library, or as a ROS 2 Ament-style package.
This package is known to build on Ubuntu 20.04. No other configuration or environment has been tested and is not supported, though it will probably work on other distributions of Ubuntu.
Building the packages requires the following dependencies:
- cmake
sudo apt install -y cmake
- build-essential
sudo apt install -y build-essential
- yaml-cpp-dev
sudo apt install -y yaml-cpp-dev
git clone --recursive https://github.com/Interbotix/interbotix_xs_driver.git -b main
cd interbotix_xs_driver
mkdir build
cd build
cmake ..
make
sudo make install
Building the packages requires the following dependencies:
mkdir -p colcon_ws/src
cd colcon_ws/src
git clone https://github.com/Interbotix/interbotix_xs_driver.git
git clone https://github.com/Interbotix/dynamixel-workbench.git -b ros2
cd ..
rosdep install --from-paths src --ignore-src -r -y
colcon build
The X-Series Driver is compiled as a library and can be used in any C++ project by simply including its headers and linking against it.
#include "interbotix_xs_driver/xs_logging.hpp" // Logging macros and utils
#include "interbotix_xs_driver/xs_common.hpp" // Common variables and types
#include "interbotix_xs_driver/xs_driver.hpp" // The InterbotixDriverXS class
...
find_package(interbotix_xs_driver REQUIRED)
...
add_executable(your_executable)
ament_target_dependencies(your_executable interbotix_xs_driver ...)
...
Then create an InterbotixDriverXS
object, providing the following in the order stated:
- Absolute filepath to the motor configs file
- Absolute filepath to the mode configs file
- A boolean indicating whether the Driver should write to the EEPROM on startup
- A string indicating the driver's logging level containing one of the following: "DEBUG", "INFO", "WARN", "ERROR", "FATAL"
This initialization would look something like below:
std::unique_ptr<InterbotixDriverXS> xs_driver = std::make_unique<InterbotixDriverXS>(
filepath_motor_configs,
filepath_mode_configs,
write_eeprom_on_startup,
logging_level);
See the package's source code for more details.