Skip to content

Drone-FYP2021-PolyU-EIE/ROS_CircuitPython_ServoKit

Repository files navigation

ROS_CircuitPython_ServoKit

Simple ROS wripper for Adafruit_CircuitPython_ServoKit. We test it in Jetson NX and AGX. This should also work on pi 4 and other ciruitpython support platform

ROS Topics

Type Topic Data_type
Subscriber /servo/angle Custom Message AllServoAngle

Input

/servo/angle, AllServoAngle

Prerequisites

  • ROS
  • Python3
  • CircuitPython_ServoKit

Install

more install detail

git clone https://github.com/Drone-FYP2021-PolyU-EIE/ServoKit.git
cd ServoKit
bash installServoKit.sh

Now cd to your catkin workspace/src

git clone https://github.com/Drone-FYP2021-PolyU-EIE/ROS_CircuitPython_ServoKit.git
catkin_make --cmake-args \
      -DPYTHON_EXECUTABLE=/usr/bin/python3

Launch the Node

lauchROS_CircuitPython_ServoKit_Node.launch

Simulation Mode

roslaunch ros_circuitpython_servokit_node exampleSimMode.launch

Custom ROS Message

AllServoAngle

Header + float32 array lenght of 16(0th mean channel 0, etc... )

rosmsg show ros_circuitpython_servokit_msgs/AllServoAngle

image

Test i2c bus on Jetson

sudo i2cdetect -y -r <i2c bus>

Common install problem on Jetson

"Error:future feature annotations is not defined"

sudo -H pip3 install Adafruit-PlatformDetect==3.19.6

"NameError: name 'I2C' is not defined"

sudo -H pip3 install adafruit-circuitpython-typing