Kondo B3M motor driver
This ROS package contains hardware interface to Kondo Kagaku's ICS motor system. ICS(Interactive Communication System) is a kind of serial bus to control RC servo motors. Basically it can control measure its position. It has additional features such as setting gain, getting current.
This package contains ics read/write code (ics.c, ics.h) from libkondo4 project.
USB ICS Adapters
ICS servo motors
Install necessary packages
sudo apt-get install ros-<distribution>-joint-state-controller sudo apt-get install ros-<distribution>-effort-controllers sudo apt-get install ros-<distribution>-position-controllers
Detect device driver
sudo modprobe ftdi_sio sudo su echo "165C 0009" > /sys/bus/usb-serial/drivers/ftdi_sio/new_id exit sudo chmod 0666 /dev/ttyUSB<serial adapter port>
Setting servo ID.
Connect each servo and the adapter one to one. For setting servo ID, you can use ics_set_id.
$ rosrun ics_set_id <product_id> <id>
product_id is 6 for 'ICS USB adapter HS', 8 for 'dual ICS adapter HS'.
After setting each servo motor, you can connect your motors as you want.
Describe servo setting in yaml file. 'driver_sample.yaml' shows the example in which two motors (ID0,ID1) connected.
- Change product_id to your adapter.
- Change joint_0_driver and joint_1_driver field as your servo system.
Each field is;
- joint: Name of joint
- id: Servo's ICS id. It is set by utility.
- min_anlge: Minimum angle of servo [deg.]
- max_anlge: Maximum angle of servo [deg.]
- speed: speed paramter. See ICS manual.
- stretch: stretch parameter. See ICS manual.
The kondo_driver is fit for using ros_controllers. Check config/controller_sample.yaml for ros_control configuration. This example uses position_controllers/JointPositionController to control joint position and joint_state_controller/JointStateController to publish /joint_states.
Launch kondo_driver.launch to bring up driver.
The following sample bring up controllers.
$ roslaunch kondo_driver kondo_driver.launch
Command the servo
Check if you can command the sevo position. Publish /joint_0_controller/command (std_msgs/Float64) to control joint angle. Unit is in radian.
$ rostopic pub -1 /joint_0_controller/command std_msgs/Float64 "data: 0.0"