Code repository and issue tracker for the Fall 2015 of "Advanced Robotics" (Independent Study group)
http://correll.cs.colorado.edu/?page_id=3748
This repo contains the files necessary to build and control a Stewart platform.
This code uses:
-
Ubuntu 14.04
-
ROS Indigo
Install ROS indigo if you haven't already: http://wiki.ros.org/indigo/Installation/Ubuntu
Setup environment variables:
source /opt/ros/indigo/setup.bash
Setup the workspace:
mkdir -p ~/stewart_ws/src
cd ~/stewart_ws/src
catkin_init_workspace
sudo apt-get install ros-indigo-rosserial-arduino ros-indigo-rosserial ros-indigo-rosserial-server python-catkin-tools
cd ~/stewart_ws/src
git clone <https://address>
mv advancedrobotics/ stewart_platform/
cd ~/stewart_ws
mkdir src/stewart_platform/include
catkin build
source ~/stewart_ws/devel/setup.bash
sudo cp ~/stewart_ws/src/stewart_platform/dev_rules/*.rules /etc/udev/rules.d/
sudo udevadm trigger
roscd stewart_platform/
Make sure to unplug and replug the usb devices after running udevadm trigger.
sudo gedit ~/.bashrc
Add these 2 lines at the bottom:
source /opt/ros/indigo/setup.bash
source ~/stewart_ws/devel/setup.bash
Install Dynamixel Dependencies:
sudo apt-get install ros-indigo-dynamixel-motor
Make sure roscore is running. If not, run this command in a separate terminal:
roscore
In a new terminal, bring up the dynamixel servos:
roslaunch stewart_platform controller_manager.launch
You should see the motors move to the min range, max range, and then a neutral position when running this test. If they don't move, but you don't have any errors, try restarting everything. If you have errors, good luck!
rosrun stewart_platform stewart_ik_test
stewart platform math and instructions are here
rosrun stewart_platform stewart_accel_test
A Razor tutorial. Use this tutorial to calibrate the Razor.
NOTE Yaw will not be correct if the magnetometer is not set up properly.
You can view the data in a serial monitor tool, such as Arduino or PuTTy.
Install arduino from webpage, not distro.
rosserial_arduino
Tutorials are here
Start Arduino
Change the Serial Port to the one that the Sparkfun Razor is plugged into by navigating to and changing Tools -> Serial Port -> /dev/ttyUSB#
Navigate to Tools -> Serial Monitor
Change the baud rate to 57600
You should see scrolling data that changes when you move the IMU around and that looks similar to:
#YPR=-157.65,2.94,-0.14
#YPR=-157.67,2.95,-0.15
#YPR=-157.69,2.95,-0.14
#YPR=-157.72,2.96,-0.13
...
download the RoboPlus software from dynamixel
see this page for driver installation problems
Use the Dynamixel wizard to set up the servos. 2, 4, 6 need to be in the reverse direction mode. The files in this package assume the communication baud rate is (0x34) 57600.
- Remember to wire up the servos before installing them
- Add a laser cut hole to bottom of servo stands for easer cable routing
- Ensure servo horns are aligned to the zero position.
- Make all bars the same length and command servos to same position before installing the upper plate.