Skip to content

ROS package with a rosserial compatible USB servo controller node based on an Arduino Micro

License

Notifications You must be signed in to change notification settings

Vijfendertig/rosserial_servo_controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rosserial servo controller node (Arduino Micro)

This package builds a rosserial compatible USB servo controller from an Arduino Micro.

The rosserial node provides /servo/control and /servo/control_raw subscribers which receive target positions (relative positions (-1000 to 10000) or absolute pulse widths (in µs)) for the different servos.

Dependencies

The (patched) arduino-cmake dependency is included as git submodules.

Building

Include the package in a ROS workspace. Both building (messages, firmware...) and uploading the firmware is done using catkin_make.

Due to some internal details of rosserial_arduino's make_libraries.py script, building the package isn't as straightforward as I would like it to be. The problem is that to create our custom messages in the Arduino ros_lib library, rosserial_arduino's make_libraries.py script needs to source the workspace's setup script, which isn't available until the build is finished. See [ros-drivers/rosserial#239] for more details. The most elegant workaround I found is to exclude the firmware from the default catkin_make (or CMake) target and build it manually afterwards.

So, to build the package including the firmware for the Arduino Micro, run:

  • catkin_make -DARDUINO_SDK_PATH=/opt/arduino-1.8.8 (to build everything except the firmware)
  • . ./devel/setup.bash (or the setup script for your favourite shell)
  • catkin_make ros_servo_controller_firmware_arduino_micro (to build the firmware)
  • catkin_make ros_servo_controller_firmware_arduino_micro-upload (to upload the firmware to your Arduino Micro)

Running

...

License

MIT license, see LICENSE.md for details.

Git submodules:

About

ROS package with a rosserial compatible USB servo controller node based on an Arduino Micro

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages