ahl_wbc is a metapackage that contains ROS packages for whole body control/operational space control/task space control.
If you use this package,
- you can easily control robots with many joints (See video clips below!)
- you can add force control with the same framework
- you don't need inverse kinematics
Reference : The operational space framework
- wbc/ahl_robot : Implement kinematics including transformation, computation of Jacobian and mass matrix.
- wbc/ahl_robot_controller : Provide joint space control and task space control
- samples/ahl_youbot_description : Contain urdf description of YouBot
- samples/ahl_pr2_description : Contain urdf description of PR2
- samples/ahl_red_arm : Contain sdf description of original red arm
- Ubuntu 14.04 LTS
- ROS Indigo, Jade (Jade is preferable)
- Gazebo 5.0 or later
- ros-control and ros-controllers (for gazebo simulation)
ROS is an open source middle ware for robot developers.
It serves vast amount of useful features and packages.
If you have enough strage, install ros-jade-desktop-full.
Official documentation
Catkin is a cmake-based build system supported by ROS.
In catkin workspace, we edit codes and build software.
Official documentation
Gazebo is a robotic simulator, which provides visualization, physics and collision detection in virtual environment.
sudo apt-get install gazebo5
In order to fully make use of gazebo with ROS, we need these controllers.
sudo apt-get install ros-jade-ros-control ros-jade-ros-controllers
In your catkin_ws/src/ahl_ros_packages, execute the follows.
git clone https://github.com/daichi-yoshikawa/ahl_common.git
git clone https://github.com/daichi-yoshikawa/ahl_wbc.git
You need two terminals.
Firstly, you have to launch ros node which provides virtual robot model.
In this phase, no window will pop up, because gazebo GUI is off by default.
If you'd like to simulate KUKA youBot,
roslaunch ahl_youbot_description youbot.launch
Or if you'd like to simulate PR2,
roslaunch ahl_pr2_description pr2.launch
And then, launch the whole body controller.
If you make success, rviz will pop up and you can see robot model in it.
If you launched youbot.launch at the previous step,
roslaunch ahl_robot_samples youbot.launch
Or if you launched pr2.launch at the previous step,
roslaunch ahl_robot_samples pr2.launch
ahl_robot_samples is a good reference to know how to use APIs.
You have two ways to control physical robots.
- Based on input of desired torques at joints (Torque sensors and solid torque control is MUST.)
- Based on input of desired angles at joints (Works without torque sensors but cannot control a force)
ahl_ctrl::RobotController::computeGeneralizedForce derives desired torques.
ahl_ctrl::RobotController::simulate computes desired joint angles based on torques derived by ahl_ctrl::RobotController::computeGeneralizedForce.
Most robots don't have torque sensor on it. Therefore ahl_ctrl::RobotController::simulate will help you.
ahl_youbot_description and ahl_pr2_description are good references to setup robot model for simulation.
Be careful ! Torque control is pretty difficult !!