Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable samplerobot sample in kinetic #246

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions hrpsys_gazebo_general/config/SampleRobot.conf

This file was deleted.

62 changes: 32 additions & 30 deletions hrpsys_gazebo_general/config/SampleRobot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
hrpsys_gazebo_configuration:
## velocity feedback for joint control, use parameter gains/joint_name/p_v
use_velocity_feedback: true
use_velocity_feedback: false
iob_rate: 500
## synchronized hrpsys and gazebo
# use_synchronized_command: false
# name of robot (using for namespace)
Expand Down Expand Up @@ -70,35 +71,35 @@ hrpsys_gazebo_configuration:
# 28 - CHEST
## joint gain settings
gains:
LLEG_HIP_R: {p: 12000.0, d: 4.0, i: 0.0, vp: 6.0, i_clamp: 0.0, p_v: 250.0}
LLEG_HIP_P: {p: 24000.0, d: 6.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LLEG_HIP_Y: {p: 4000.0, d: 4.0, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
LLEG_KNEE: {p: 36000.0, d: 6.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LLEG_ANKLE_P: {p: 18000.0, d: 3.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LLEG_ANKLE_R: {p: 6000.0, d: 2.0, i: 0.0, vp: 4.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_R: {p: 12000.0, d: 4.0, i: 0.0, vp: 6.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_P: {p: 24000.0, d: 6.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_Y: {p: 4000.0, d: 4.0, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
RLEG_KNEE: {p: 36000.0, d: 6.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
RLEG_ANKLE_P: {p: 18000.0, d: 3.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
RLEG_ANKLE_R: {p: 6000.0, d: 2.0, i: 0.0, vp: 4.0, i_clamp: 0.0, p_v: 250.0}
WAIST_P: {p: 8000.0, d: 4.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
WAIST_R: {p: 8000.0, d: 4.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
CHEST: {p: 6000.0, d: 2.0, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LARM_SHOULDER_P: {p: 1200.0, d: 1.0, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
LARM_SHOULDER_R: {p: 500.0, d: 0.5, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 120.0}
LARM_SHOULDER_Y: {p: 200.0, d: 0.3, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_ELBOW: {p: 1000.0, d: 1.4, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
LARM_WRIST_Y: {p: 200.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_WRIST_P: {p: 300.0, d: 0.2, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_WRIST_R: {p: 20.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_SHOULDER_P: {p: 1200.0, d: 1.0, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
RARM_SHOULDER_R: {p: 500.0, d: 0.5, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 120.0}
RARM_SHOULDER_Y: {p: 200.0, d: 0.3, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_ELBOW: {p: 1000.0, d: 1.4, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
RARM_WRIST_Y: {p: 200.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_WRIST_P: {p: 300.0, d: 0.2, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_WRIST_R: {p: 20.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LLEG_HIP_R: {p: 6000.0, d: 0.1, i: 0.0, vp: 6.0, i_clamp: 0.0, p_v: 250.0}
LLEG_HIP_P: {p: 6000.0, d: 0.15, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LLEG_HIP_Y: {p: 2000.0, d: 0.1, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
LLEG_KNEE: {p: 9000.0, d: 0.15, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
LLEG_ANKLE_P: {p: 4500.0, d: 0.075, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LLEG_ANKLE_R: {p: 3000.0, d: 0.05, i: 0.0, vp: 4.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_R: {p: 6000.0, d: 0.1, i: 0.0, vp: 6.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_P: {p: 6000.0, d: 0.05, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
RLEG_HIP_Y: {p: 2000.0, d: 0.1, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
RLEG_KNEE: {p: 9000.0, d: 0.15, i: 0.0, vp: 1.0, i_clamp: 0.0, p_v: 250.0}
RLEG_ANKLE_P: {p: 4500.0, d: 0.075, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
RLEG_ANKLE_R: {p: 3000.0, d: 0.05, i: 0.0, vp: 4.0, i_clamp: 0.0, p_v: 250.0}
WAIST_P: {p: 8000.0, d: 0.1, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
WAIST_R: {p: 8000.0, d: 0.1, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
CHEST: {p: 6000.0, d: 0.05, i: 0.0, vp: 20.0, i_clamp: 0.0, p_v: 250.0}
LARM_SHOULDER_P: {p: 1200.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
LARM_SHOULDER_R: {p: 500.0, d: 0.05, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 120.0}
LARM_SHOULDER_Y: {p: 200.0, d: 0.03, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_ELBOW: {p: 1000.0, d: 0.14, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
LARM_WRIST_Y: {p: 200.0, d: 0.01, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_WRIST_P: {p: 300.0, d: 0.02, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
LARM_WRIST_R: {p: 20.0, d: 0.01, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_SHOULDER_P: {p: 1200.0, d: 0.1, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
RARM_SHOULDER_R: {p: 500.0, d: 0.05, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 120.0}
RARM_SHOULDER_Y: {p: 200.0, d: 0.03, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_ELBOW: {p: 1000.0, d: 0.14, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 160.0}
RARM_WRIST_Y: {p: 200.0, d: 0.01, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_WRIST_P: {p: 300.0, d: 0.02, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
RARM_WRIST_R: {p: 20.0, d: 0.01, i: 0.0, vp: 0.0, i_clamp: 0.0, p_v: 100.0}
## force sensor settings
## list of force sensorname
force_torque_sensors:
Expand All @@ -116,6 +117,7 @@ hrpsys_gazebo_configuration:
## IMU sensor settings
## configuration of IMU sensor
## key of imu_sensors_config should be a member of imu_sensors
## pose of IMU sensor should be written in URDF
imu_sensors:
- imu_sensor0
imu_sensors_config:
Expand Down
2 changes: 1 addition & 1 deletion hrpsys_gazebo_general/launch/robot_hrpsys_bringup.launch
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- hrpsys_gazebo settings -->
<arg name="SYNCHRONIZED" default="false" />
<arg name="IOB_SUBSTEPS" default="5" />
<arg name="HRPSYS_RATE" default="200" />
<arg name="HRPSYS_RATE" default="500" />

<env if="$(arg SYNCHRONIZED)"
name="HRPSYS_GAZEBO_IOB_SYNCHRONIZED" value="1" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<arg name="KINEMATICS_MODE" default="false"/>
<arg name="SYNCHRONIZED" default="false" />
<arg name="USE_UNSTABLE_RTC" default="true"/>

<rosparam command="load"
file="$(find hrpsys_ros_bridge)/models/SampleRobot_controller_config.yaml" />
Expand All @@ -21,8 +22,8 @@
<arg name="ROBOT_TYPE" value="SampleRobot" />
<arg name="USE_INSTANCE_NAME" value="true" />
<arg name="SYNCHRONIZED" value="$(arg SYNCHRONIZED)" />
<arg name="HRPSYS_PY_ARGS" value="--use-unstable-rtc" />
<arg name="CONF_FILE" default="$(find hrpsys_gazebo_general)/config/SampleRobot.conf" />
<arg name="HRPSYS_PY_PKG" value="hrpsys_ros_bridge" if="$(arg USE_UNSTABLE_RTC)"/>
<arg name="HRPSYS_PY_NAME" value="samplerobot_hrpsys_config.py" if="$(arg USE_UNSTABLE_RTC)"/>
<arg name="KINEMATICS_MODE" value="$(arg KINEMATICS_MODE)"/>
<arg name="BASE_LINK" value="WAIST_LINK0" />
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
</accel>
</noise>
</imu>
<pose>0 0 0 1.5708 0 3.14159</pose>
</sensor>
</gazebo>
<!-- add force sensor -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ sed -i -e 's@continuous@revolute@g' ${OUTPUT_FILE}
sed -i -e 's@effort="100"@effort="200"@g' ${OUTPUT_FILE}
## change max velocity
sed -i -e 's@velocity="0.5"@velocity="6.0"@g' ${OUTPUT_FILE}
## change friction
sed -i -e 's@friction="0"@friction="1"@g' ${OUTPUT_FILE}
## change damping
sed -i -e 's@damping="0.2"@damping="1"@g' ${OUTPUT_FILE}
2 changes: 1 addition & 1 deletion hrpsys_gazebo_general/src/IOBPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ void IOBPlugin::Load(physics::ModelPtr _parent, sdf::ElementPtr _sdf) {
qt.z = xmlrpc_value_as_double(rot[3]);
}
fsi.pose = PosePtr(new math::Pose (vtr, qt));
this->forceSensors[sensor_name] = fsi;
}
this->forceSensors[sensor_name] = fsi;
}
} else {
ROS_ERROR("Force-Torque sensor: %s has invalid configuration", sensor_name.c_str());
Expand Down