This repository contains 3D CAD models and source code for 7 DOF arm tracker developed in ALARIS Lab at Nazarbayev University. For more information see link
Please cite the below work if you utilize our arm tracker design in your academic work:
link)Shintemirov, A.; Taunyazov, T.; Omarali, B.; Nurbayeva, A.; Kim, A.; Bukeyev, A.; Rubagotti, M. An Open-Source 7-DOF Wireless Human Arm Motion-Tracking System for Use in Robotics Research. Sensors 2020, 20, 3082. (
The code is written to run on ROS and was tested on ROS Kinetic, but should be compatible with later versions of ROS as well. To install ROS, follow installation instructions on ros.org.
How to set up WIXEL
- Install Pololu Wixel Configuration Utility - it can be downloaded here
Follow these steps to upload programs to Wixel
- Connect the Wixel controller to the PC via the USB port.
- Run the Pololu Wixel Configuration Utility program, the serial number of your controller should appear in the "Wixels" window.
General parameters for wixel controllers that are associated with UM7
- Click "Open" button to upload the file
- In the
serial_modeshould be filled in different ways depending on which Wixel (receiver or transmitter) you are going to configure. For receivers it is 1, and for transmitters 2.
Baud ratefor everything is 115200.
- nDTR_pin - 5, nRTS_pin - 11, nDRS_pin - 4, nCD_pin - 13, arduino_DTR_pin - 0, framing_error_ms - 0 for both transmitter and receiver.
- For one pair of receiver and transmitter, one radio channel must be selected. The channel number is from 0 to 255 and determines what frequency to broadcast. The default value is 128. The wixels must be on the same channel to communicate with each other. To avoid interference, Wixels that aren’t supposed to talk to each other should be at least 2 channels away from each other. For example, you could have one pair of Wixels on channel 128 and another pair on 130.
- After completing the table, click the
Write to Wixelbutton.
General parameters for a wixel controller connected to a potentiometer
wireless_adc_tx.wxlinto the wixel transmitter and select one radio channel for pair.
wireless_adc_rx.wxlto the wixel receiver and indicate the selected radio channel in the table.
- After filling out the table, press the button
Write to Wixel.
Setting up the code
Create a ROS workspace. In a terminal window run:
mkdir -p ~/catkin_ws/src
Put the serial_comm folder into catkin_ws/src folder.
Run the following command from workspace root directory to install missing dependencies:
rosdep install --from-paths src --ignore-src -r -y
Run catkin_make from workspace root directory to build the code.
Change mod of controller_node.py to 'executable' with
chmod +x controller_node.pyto be able to run the program.
Add yourself to
dialoutgroup with command
sudo adduser $USER dialout. Log out and log in again for the command to take effect. This is needed for you to have the rights to open serial ports.
Assign to tracker ports static port names as in serial_comm/src/serial_comm.cpp lines 36-38. Specifically, call them port_shoulder, port_elbow, port_wrist. To find out which port belongs to which sensor use
sudo cat /dev/ttyACMx, with
xreplaced by port number, to start listening to the port, then turn on each sensor one by one and observe if there is a feedback.
Then follow this guide to link every port to a static name. As device attribute (ATTRS) use Wixel's serial number.
After finishing the guide unplug and plug in the USB hub with Wixels and check with
ls /dev | grep port_if there are corresponding ports.
Finally, you will need to install CoppeliaSim to run the arm simulation.
Run the code
- Run CoppeliaSim
- Open scene serial_comm/simple_arm.ttt
- Start roscore
- Read sensors raw data and compute quaternions:
rosrun serial_comm serial_comm
For estimating quaternions we use IMU and AHRS sensor fusion algorithm by Sebastian Madgwick from here
- Send estimated quaternions to arm joints in CoppeliaSim and get end-effector pose:
rosrun serial_comm controller_node.py
End-effector pose is published to topic /end_effector
- Magdwick algorithm needs some time to converge. Wait until it converges and initialize it with
rostopic pub /initialize std_msgs/String "data: 'init'" -1
Note: Depending on presense of metal in the environment, which disturbs magnetometer, the algorithm will give shifted quaternions. Tune orientation by playing with quaternions in controller_node.py lines 24-46.