| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A C++ library for CAN communication with OpenArm robotic hardware, supporting Damiao motors over CAN/CAN-FD interfaces. This library is a part of OpenArm. See detailed setup guide and docs here.
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:openarm/main
sudo apt update
sudo apt install -y \
libopenarm-can-dev \
openarm-can-utilssudo dnf install -y epel-release
sudo dnf config-manager --set-enabled powertoolssudo dnf install -y epel-release
sudo crb enablesudo dnf config-manager --set-enabled crb
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel{,-next}-release-latest-9.noarch.rpmsudo dnf config-manager --set-enabled crb
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpmreleasever="$(. /etc/os-release && echo $VERSION_ID | grep -oE '^[0-9]+')"
sudo subscription-manager repos --enable codeready-builder-for-rhel-$releasever-$(arch)-rpms
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$releasever.noarch.rpmsudo dnf update
sudo dnf install -y \
openarm-can-devel \
openarm-can-utilsConfigure your CAN interface using the provided script:
# CAN 2.0 (default)
openarm-can-configure-socketcan can0
# CAN-FD with 5Mbps data rate
openarm-can-configure-socketcan can0 -fdopenarm-can-cli provides a command-line interface for motor configuration and diagnostics.
# Configure CAN interface (default: 1Mbps nominal, 5Mbps data, CAN-FD)
openarm-can-cli -i can0 can_configure
# Configure with 1Mbps data rate (Classic CAN)
openarm-can-cli -i can0 can_configure -d 1000000 --no-fd
# Discover motors on the bus
openarm-can-cli -i can0 discover
# Monitor motor status (arm motors 1-8 by default)
openarm-can-cli -i can0 monitor
# Monitor specific motors
openarm-can-cli -i can0 monitor --id 1,2,3Run openarm-can-cli -h for full usage.
#include <openarm/can/socket/openarm.hpp>
#include <openarm/damiao_motor/dm_motor_constants.hpp>
openarm::can::socket::OpenArm arm("can0", true); // CAN-FD enabled
std::vector<openarm::damiao_motor::MotorType> motor_types = {
openarm::damiao_motor::MotorType::DM4310, openarm::damiao_motor::MotorType::DM4310};
std::vector<uint32_t> send_can_ids = {0x01, 0x02};
std::vector<uint32_t> recv_can_ids = {0x11, 0x12};
openarm.init_arm_motors(motor_types, send_can_ids, recv_can_ids);
openarm.enable_all();See dev/README.md for how to build.
Warning
⚠️ WARNING: UNSTABLE API ⚠️ Python bindings are currently a direct low level temporary port, and will change DRASTICALLY. The interface may break between versions. Use at your own risk! Discussions on the interface are welcome.
Build & Install:
Please ensure that you install the C++ library first, as 1. Install or dev/README.md.
cd python
# Create and activate virtual environment (recommended)
python -m venv venv
source venv/bin/activate
pip install .Usage:
# WARNING: This API is unstable and will change!
import openarm_can as oa
arm = oa.OpenArm("can0", True) # CAN-FD enabled
arm.init_arm_motors([oa.MotorType.DM4310], [0x01], [0x11])
arm.enable_all()See dev/README.md.
Licensed under the Apache License 2.0. See LICENSE.txt for details.
Copyright 2025-2026 Enactic, Inc.
All participation in the OpenArm project is governed by our Code of Conduct.
| Back | FazBrowse Home | New Git URL |