-
Notifications
You must be signed in to change notification settings - Fork 14
Changing Viscous Damping Coefficients Over ROS Service
This tutorial will explain how to change Atlas robot and Sandia hand joint viscous damping coefficients.
We assume that you've already done the installation step.
In this tutorial, we'll demonstrate how to call ROS services in command-line using rosservice.
After running Gazebo with Atlas, roslaunch drcsim_gazebo atlas_sandia_hands.launch, you can then use rosservice list to look for existing services:
rosservice list | grep damping
/atlas/get_joint_damping
/atlas/set_joint_damping
/sandia_hands/l_hand/get_joint_damping
/sandia_hands/l_hand/set_joint_damping
/sandia_hands/r_hand/get_joint_damping
/sandia_hands/r_hand/set_joint_damping
Each service is described in detail below:
To get Atlas robot model's current joint damping coefficients, ROS service: /atlas/get_joint_damping message type: atlas_msgs/srv/GetJointDamping To set Atlas robot model's joint damping coefficients, ROS service: /atlas/set_joint_damping message type: atlas_msgs/srv/SetJointDamping To get Sandia hand model's current joint damping coefficients (right hand), ROS service: /sandia_hands/r_hand/get_joint_damping message type: atlas_msgs/srv/GetJointDamping To set Sandia hand model's joint damping coefficients, ROS service: /sandia_hands/r_hand/set_joint_damping message type: atlas_msgs/srv/SetJointDamping
To run this tutorial, you'll need at least 2 separate terminals. Don't forget to execute following setup commands in each new terminal you open.
. /usr/share/drcsim/setup.sh
Start simulation of Atlas robot with Sandia hands:
roslaunch drcsim_gazebo atlas_sandia_hands.launch
To see information the current damping coefficients for Atlas, as well as the max and min values, open a separate terminal and run the following:
rosservice call /atlas/get_joint_damping
You should see output similar to the following:
damping_coefficients: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1]
damping_coefficients_min: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
damping_coefficients_max: [516.7333333333333, 861.8458333333333, 395.4583333333333, 20.833333333333336, 458.3333333333333, 750.0, 1083.3333333333335, 1666.6666666666667, 916.6666666666666, 375.0, 458.3333333333333, 750.0, 1083.3333333333335, 1666.6666666666667, 916.6666666666666, 375.0, 883.3333333333334, 708.3333333333333, 475.0, 475.0, 475.0, 250.0, 883.3333333333334, 708.3333333333333, 475.0, 475.0, 475.0, 250.0]
success: True
status_message: success
Here, the array of damping_coefficients should have exactly 28 elements for DRCSim < 4.2 and 30 elements for DRCSim >= 4.2, with each element corresponds to one joint as listed in atlas_msgs/AtlasState.msg. In this example, all joints will have a damping coefficient of 0.1 Nmsec/rad, with the exception of r_arm_uwy with damping coefficient of 0.2 Nmsec/rad.
To see the damping values for the Sandia hands, type the following:
rosservice call /sandia_hands/r_hand/get_joint_damping
You should see the following:
damping_coefficients: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
damping_coefficients_min: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
damping_coefficients_max: [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
success: True
status_message: success
Here, each element of the damping_coefficients array corresponds to a joint as listed in SandiaHandPlugin.cc line 84 ~ 95. So for example, above rosservice call will set all joint damping values to 30 Nmsec/rad with the exception of f3_j0, with damping coefficient of 5.0 Nmsec/rad.
Change the Sandia hands model joint damping coefficients by typing:
For DRCSim < 4.2:
. /usr/share/drcsim/setup.sh
rosservice call /sandia_hands/r_hand/set_joint_damping "damping_coefficients: [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 5.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"
For DRCSim >= 4.2+, the message sent over this service is two entries longer. You'll need to send the following command instead:
. /usr/share/drcsim/setup.sh
rosservice call /sandia_hands/r_hand/set_joint_damping "damping_coefficients: [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 5.0, 30.0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]"
Similarly for the Atlas robot model:
For DRCSim < 4.2:
. /usr/share/drcsim/setup.sh
rosservice call /atlas/set_joint_damping "damping_coefficients: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1]"
For DRCSim 4.2+:
. /usr/share/drcsim/setup.sh
rosservice call /atlas/set_joint_damping "damping_coefficients: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.2, 0.1, 0.1, 0.1]"
-
Robot Simulators
-
Build a Robot
- Model structure and requirements
- How to contribute a model
- Make a model
- Make a Mobile Robot
- The relationship among Link, Joint and Axis
- Import Meshes
- Attach Meshes
- Add a Sensor to a Robot
- Make a Simple Gripper
- Attach Gripper to Robot
- Nested model
- Model Editor
- Animated Box
- Make an animated model(actor)
- Inertial parameters of triangle meshes
- Visibility layers
-
Model Editor
-
Build a World
-
Tools and utilities
-
Write a plugin
-
Plugins
-
Sensors
-
User input
-
Transport Library
-
Rendering Library
-
Connect to ROS
-
Ros Control - Advanced
-
DRCSIM for ROS Kinetic (Ubuntu16.04)
-
DRCSIM
- DRC Simulator installation
- Launchfile options
- Spawn Atlas into a custom world
- Animate joints
- Atlas Keyboard Teleoperation over ROS
- Teleoperate atlas with a music mixer
- Visualization and logging
- Atlas MultiSense SL head
- How to use the Atlas Sim Interface
- Atlas fake walking
- Grasp with Sandia hands
- DRC vehicle tele-operation
- DRC vehicle tele operation with Atlas
- Sending joint commands with ROS
- Atlas control over ROS with python
- Modify environment
- Atlas switching control modes
- Atlas Controller Synchronization over ROS Topics
- Changing Viscous Damping Coefficients Over ROS Service
- Running BDI controller demo
- Using the RobotiQ 3 Finger Adaptive Robot Gripper
- BDI Atlas Robot Interface 3.0.0 Stand In Example
-
HAPTIX
- HAPTIX software install and update
- HAPTIX C API
- HAPTIX Matlab and Octave API
- HAPTIX Simulation World API
- HAPTIX Teleoperation
- HAPTIX environment setup
- HAPTIX Optitrack Control
- HAPTIX Tactor Glove
- HAPTIX Simulation World API with Custom World Example
- HAPTIX logging
- HAPTIX DEKA Luke hand installation
- HAPTIX Simulation Scoring Plugin Example
-
MoveIt!
-
Rviz & rqt & ROSBAG
- Control Theory
- TroubleShooting
- Solidworks model to URDF
- ROS-Gazebo with MATLab
- MATLab installation in Linux
- [Gazebo simulation with MATLab]