If everything works, open and upload the following sketch
File -> Sketchbook -> ArbotiX Sketches -> ros
1.2 Install Arbotix ROS drivers
You can install arbotix ROS packages from repository (ros-kinetic-arbotix package), but for the pincher gripper to work, you need to build an unrealeased 0.11.0 version which adds support for prismatic joints.
Source your catkin workspace (either /opt/ros/kinetic or ~/ros_ws/devel depending on how you installed Arbotix ROS drivers) and run:
arbotix_terminal by default, assumes the board is connected on /dev/ttyUSB0 port. If it is attached to another device, you can specify it like this:
To check which port the device connects to, you can, for instance, run dmesg -w (Ctrl+C to exit), connect the device and check kernel logs.
If you are using Ubuntu on Windows Subsytem for Linux , you need to open Device Manager and look under Ports for COM port number of the device. COM[N] corresponds to /dev/ttyS[N] path. (e.g. COM4 -> /dev/ttyS4). You might need to run:
sudo chmod 666 /dev/ttyS[N]
A terminal prompt should appear. Type help for list of commands.
Connect the Dynamixel you want to set id to. Then type ls to see id of connected servo and mv [source] [target] to change it. For example, when the servo has id 1 and we want to set it to 2, just type mv 1 2.
On PhantomX pincher arm, servo ids should look like this:
When done, type Ctrl+C to exit terminal
1.4 Test Arbotix ROS drivers
We will create a package that tests arbotix driver. Let's start by creating an empty package
You should see command topics that let you set position (in radians) for each servo and joint_states topic that informs about position and velocity of each joint. There should also be services that allow enabling, relaxing or setting speed (in radians/sec) for each servo.
Let's try to move servo1 joint.
First, set speed to a safe value (0.2 r/s in this case):