-
This experiment was implemented on the Tokyo Robotics 7-DoF arm.
-
First be sure to install all the dependencies in requirements.txt: pip install -r requirements.txt --user.
-
I expect that the experiment should be reproducible on any other 7-DoF arm.
-
First turn off the current on all the servos of your manipulator arm
-
Then manually move the arm to the world coordinates where you want it to go, recording the joint angles and joint angle velocities in the process. See Torobo/Takahashi/main.py for an example in the
set_current
function -
Then run the
ik_sub
executable in thetrac_ik_torobo
package to generate the cartesian coordinates from the joint space coordinates that you recorded. Be sure to callsave_to_file
as atrue
parameter:
roslaunch toroboarm_seven_bringup bringup_real.launch save_to_file:=true
- Note that this uses the KDL and the dr_kdl packages. Please download and place them in your catkin
src
folder vbefore catkin building
- Running the
ik_sub
executable should place the new cartesian coordinate file in yourLyapunovLearner/scripts/data/cart_pos.csv
path.
-
Note that depending on the joint limits of your robot arm and the maximum torque each joint's servo is allowed to accept, your robot might react haphazardly while the learning algorithm is running. Please calibrate your robot to the currents before deploying on the real robot.
-
It is expected that your robot's
urdf
file is uploaded to the ros parameter server under theparam
name/robot_description
. This would be used bytrac_ik
anddr_kdl
in computing the real-time IK joint positions of the arm. -
If you run the demo.py file with the
w
model, you should obtain a chart similar to this:
or with the s
model, you should obtain a chart similar to this:
-
In a separate terminal, launch the
torobo bringup moveit
serverroslaunch toroboarm_seven_bringup bringup_real.launch
-
Then launch the recorded joint angles publisher and run the executor as well as follows:
roslaunch trac_ik_torobo torobo.launch
- it might be a good idea to turn off the data that gets printed out to terminal. Append
disp:=false
to theroslaunch
command above
- it might be a good idea to turn off the data that gets printed out to terminal. Append
Here, we will run a Gaussian Mixture Regression on samples of data that we gathered from the robot arm. We will then call the ik_solver
embedded as a service in the Torobo ik_sub
executable continually in the while loop located in LyapunovLearner/scripts/ToroboControl/robot_executor/executor.py.
cd
into thescripts
folder ofLyapunovLearner
and runmain.py
. Be sure to do this in aPython2.7
environment where you have exposure to the rossetup.bash
orsetup.zsh
file.
Good luck.
- If you are having issues with the ik solver, try seeing if this returns anything in terminal:
rosservice call /torobo/solve_diff_ik "'desired_vel': {'linear': {'x': 0.0, 'y': 0.1, 'z': 0.2}}"
- Otherwise, check to be sure the ik service is actually online.
If you used LyapunovLearner
in your work, please cite it:
@misc{LyapunovLearner,
author = {Ogunmolu, Olalekan and Thompson, Rachel Skye and Dattari, Rodrigo Pérez},
title = {{Learning Control Lyapunov Functions in Python}},
year = {2020},
howpublished = {\url{https://github.com/lakehanne/lyapunovearner}},
note = {Accessed February 10, 2020}
}
-
Please open an issue if you are having trouble running this package.
-
Email: [email protected]