(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Add robots and environmentvs to hrpsys-simulator

Description: This tutorial shows how to add robots and environments to hrpsys-simulator

Tutorial Level: INTERMEDIATE

Next Tutorial: Model file conversion

Contents

    1. Generate configuration file and use it
        1. Generate project file
        2. Launch with generated project file
      1. SampleRobot example 1 : Add user-defined environments (20cm stair)
        1. Generate project file
        2. Launch with generated project file
      2. SampleRobot example 2 : Add user-defined environments (Terrain environment)
        1. Generate project file
        2. Launch with generated project file
      3. SampleRobot example 3 : Use torque-based simulation
        1. Generate project file
        2. Launch with generated project file
      4. SampleRobot example 4 : Use kinematics-only simulation
        1. Generate project file
        2. Launch with generated project file
      5. Sample4LegRobot example 1 : Use torque-based simulation
        1. Generate project file
        2. Launch with generated project file
      6. Sample4LegRobot example 2 : Use kinematics-only simulation
        1. Generate project file
        2. Launch with generated project file
    2. Closed robots examples
      1. HRP2JSK example 1 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      2. HRP2JSKNT example 1 : Add use-define environment (20cm stair)
        1. Generate project file
        2. Launch with generated project file
      3. HRP2JSKNT example 2 : Add use-define environment (Terrain Block)
        1. Generate project file
        2. Launch with generated project file
      4. HRP2JSKNT example 3 : Add user-defined environment (DRC terrain)
        1. Generate project file
        2. Launch with generated project file
      5. HRP2JSKNT example 4 : Add user-defined environment (DRC stair)
        1. Generate project file
        2. Launch with generated project file
      6. HRP2JSKNT example 5 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      7. HRP2JSKNT example 6 : Use kinematics only simulation
        1. Generate project file
        2. Launch with generated project file
      8. HRP2JSKNTS example 0 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      9. STARO example 1 : Add user-define environment (20cm stair)
        1. Generate project file
        2. Launch with generated project file
      10. STARO example 2 : Add user-define environment (Terrain Block)
        1. Generate project file
        2. Launch with generated project file
      11. STARO example 3 : Add user-define environment (Stair)
        1. Generate project file
        2. Launch with generated project file
      12. STARO example 4 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      13. URATALEG example 1 : Add user-define environment (20cm stair)
        1. Generate project file
        2. Launch with generated project file
      14. URATALEG example 2 : Add user-define environment (Terrain Block)
        1. Generate project file
        2. Launch with generated project file
      15. URATALEG example 3 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      16. JAXON example 1 : Add user-define environment (20cm stair)
        1. Generate project file
        2. Launch with generated project file
      17. JAXON example 2 : Add user-define environment (Terrain Block)
        1. Generate project file
        2. Launch with generated project file
      18. JAXON example 3 : Add user-define environment (Stair)
        1. Generate project file
        2. Launch with generated project file
      19. JAXON example 4 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
      20. JAXON_RED example 4 : Use torque control simulation
        1. Generate project file
        2. Launch with generated project file
    3. For Torque-control + PD servo simulation
      1. Generate project file.
      2. Write PDgain files and add file path to your conf file
      3. Execute launch file with PDcontroller
  1. Write own your model files
    1. Write own your model files as VRML file
  2. Model conversion in RTM-ROS system
    1. Conversion overview

Generate configuration file and use it

Generate project file

hrpsys-simulator is configured by OpenHRP3 Project File (XML file). Users can manually write project file or generate it by using projectGenerator in openhrp3.

Launch with generated project file

In launching hrpsys-simulator, project file is specified by PROJECT_FILE argument. http://wiki.ros.org/rtmros_common/Tutorials/WorkingWithEusLisp

SampleRobot example 1 : Add user-defined environments (20cm stair)

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample1.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/box.wrl,0.3,0,0.1,1,0,0,0 --output /tmp/SampleRobot_for_20cmStep.xml --dt 0.002

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials samplerobot.launch PROJECT_FILE:=/tmp/SampleRobot_for_20cmStep.xml

SampleRobot example 2 : Add user-defined environments (Terrain environment)

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample1.wrl `rospack find hrpsys`/share/hrpsys/samples/environments/TerrainFloor.wrl,-4.15,-0.2,0,1,0,0,0 --output /tmp/SampleRobot_for_TerrainBlock.xml --dt 0.002

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials samplerobot.launch PROJECT_FILE:=/tmp/SampleRobot_for_TerrainBlock.xml

SampleRobot example 3 : Use torque-based simulation

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample1_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/SampleRobot_for_torquecontrol.xml --timeStep 0.001 --dt 0.002 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find openhrp3`/../OpenHRP-3.1/customizer/sample1_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge samplerobot.launch PROJECT_FILE:=/tmp/SampleRobot_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller USE_UNSTABLE_RTC:=true

SampleRobot example 4 : Use kinematics-only simulation

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample1.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --integrate false --output /tmp/SampleRobot_for_kinematicsonly.xml --timeStep 0.001 --dt 0.002

Launch with generated project file

rtmlaunch hrpsys_ros_bridge samplerobot.launch PROJECT_FILE:=/tmp/SampleRobot_for_kinematicsonly.xml USE_UNSTABLE_RTC:=true

Sample4LegRobot example 1 : Use torque-based simulation

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample_4leg_robot_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/Sample4LegRobot_for_torquecontrol.xml --timeStep 0.001 --dt 0.002 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find openhrp3`/../OpenHRP-3.1/customizer/sample_4leg_robot_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge sample4legrobot.launch PROJECT_FILE:=/tmp/Sample4LegRobot_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller USE_UNSTABLE_RTC:=true

Sample4LegRobot example 2 : Use kinematics-only simulation

Generate project file

openhrp-project-generator `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/sample_4leg_robot.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --integrate false --output /tmp/Sample4LegRobot_for_kinematicsonly.xml --timeStep 0.001 --dt 0.002

Launch with generated project file

rtmlaunch hrpsys_ros_bridge sample4legrobot.launch PROJECT_FILE:=/tmp/Sample4LegRobot_for_kinematicsonly.xml USE_UNSTABLE_RTC:=true

Closed robots examples

HRP2JSK example 1 : Use torque control simulation

Generate project file

openhrp-project-generator `rospack find hrp2_models`/HRP2JSK_for_OpenHRP3/HRP2JSKmain_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/HRP2JSK_for_torquecontrol.xml --timeStep 0.001 --dt 0.004 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find hrpsys_ros_bridge_tutorials`/models/HRP2JSK_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsk.launch PROJECT_FILE:=/tmp/HRP2JSK_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller

HRP2JSKNT example 1 : Add use-define environment (20cm stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/OpenHRP/etc/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl OUTPUT:=/tmp/HRP2JSKNT_for_20cmStep.xml OBJECT_MODELS:="`rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/box.wrl,0.3,0,0.1,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.004"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_20cmStep.xml

HRP2JSKNT example 2 : Add use-define environment (Terrain Block)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/OpenHRP/etc/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl OUTPUT:=/tmp/HRP2JSKNT_for_TerrainBlock.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/TerrainFloor.wrl,-4.15,-0.2,0,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.004"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_TerrainBlock.xml

HRP2JSKNT example 3 : Add user-defined environment (DRC terrain)

Generate project file

openhrp-project-generator `rospack find hrp2_models`/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl `rospack find hrpsys`/share/hrpsys/samples/environments/DRCTestbedTerrainJPBlock.wrl,0.4,-2.0,0,1,0,0,0, --use-highgain-mode false --dt 0.004 --timeStep 0.001 --method RUNGE_KUTTA --output /tmp/HRP2JSKNT_for_DRCTestbedBlock.xml

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_DRCTestbedBlock.xml

HRP2JSKNT example 4 : Add user-defined environment (DRC stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/OpenHRP/etc/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl OUTPUT:=/tmp/HRP2JSKNT_for_DRCTestbedStair.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/DRCTestbedStair.wrl,0.15,0,0,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.004"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_DRCTestbedStair.xml

HRP2JSKNT example 5 : Use torque control simulation

Generate project file

openhrp-project-generator `rospack find hrp2_models`/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/HRP2JSKNT_for_torquecontrol.xml --timeStep 0.001 --dt 0.004 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find hrpsys_ros_bridge_tutorials`/models/HRP2JSKNT_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller

HRP2JSKNT example 6 : Use kinematics only simulation

Generate project file

openhrp-project-generator `rospack find hrp2_models`/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --integrate false --dt 0.004 --timeStep 0.004 --method RUNGE_KUTTA --output /tmp/HRP2JSKNT_for_kinematicsonly.xml

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_kinematicsonly.xml

HRP2JSKNTS example 0 : Use torque control simulation

Generate project file

openhrp-project-generator `rospack find hrp2_models`/HRP2JSKNTS_for_OpenHRP3/HRP2JSKNTSmain_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/HRP2JSKNTS_for_torquecontrol.xml --timeStep 0.001 --dt 0.004 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find hrpsys_ros_bridge_tutorials`/models/HRP2JSKNTS_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknts.launch PROJECT_FILE:=/tmp/HRP2JSKNTS_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller

STARO example 1 : Add user-define environment (20cm stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/staro/STAROmain.wrl OUTPUT:=/tmp/STARO_for_20cmStep.xml OBJECT_MODELS:="`rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/box.wrl,0.3,0,0.1,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials staro.launch PROJECT_FILE:=/tmp/STARO_for_20cmStep.xml

STARO example 2 : Add user-define environment (Terrain Block)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/staro/STAROmain.wrl OUTPUT:=/tmp/STARO_for_TerrainBlock.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/TerrainFloor.wrl,-4.15,-0.2,0,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials staro.launch PROJECT_FILE:=/tmp/STARO_for_TerrainBlock.xml

STARO example 3 : Add user-define environment (Stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/staro/STAROmain.wrl OUTPUT:=/tmp/STARO_for_DRCTestbedStair.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/DRCTestbedStair.wrl,0.15,0.0,0,1,0,0,0," CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials staro.launch PROJECT_FILE:=/tmp/STARO_for_DRCTestbedStair.xml

STARO example 4 : Use torque control simulation

Generate project file

Launch with generated project file

URATALEG example 1 : Add user-define environment (20cm stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/urataleg/URATALEGmain.wrl OUTPUT:=/tmp/URATALEG_for_20cmStep.xml OBJECT_MODELS:="`rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/box.wrl,0.3,0,0.1,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials urataleg.launch PROJECT_FILE:=/tmp/urataleg_for_20cmStep.xml

URATALEG example 2 : Add user-define environment (Terrain Block)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/staro/URATALEGmain.wrl OUTPUT:=/tmp/URATALEG_for_TerrainBlock.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/TerrainFloor.wrl,-4.15,-0.2,0,1,0,0,0" CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials urataleg.launch PROJECT_FILE:=/tmp/urataleg_for_TerrainBlock.xml

URATALEG example 3 : Use torque control simulation

Generate project file

Launch with generated project file

JAXON example 1 : Add user-define environment (20cm stair)

Generate project file

Launch with generated project file

JAXON example 2 : Add user-define environment (Terrain Block)

Generate project file

Launch with generated project file

JAXON example 3 : Add user-define environment (Stair)

Generate project file

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/euslib/rbrain/jaxon/JAXONmain.wrl OUTPUT:=/tmp/JAXON_for_DRCTestbedStair.xml OBJECT_MODELS:="`rospack find hrpsys`/share/hrpsys/samples/environments/DRCTestbedStair.wrl,0.15,0.0,0,1,0,0,0," CORBA_PORT:=15005 CONF_DT_OPTION:="--dt 0.002" SIMULATION_TIMESTEP_OPTION:="--timeStep 0.002"

Launch with generated project file

rtmlaunch hrpsys_ros_bridge_tutorials jaxon.launch PROJECT_FILE:=/tmp/JAXON_for_DRCTestbedStair.xml

JAXON example 4 : Use torque control simulation

Generate project file

openhrp-project-generator `rospack find jsk_models`/JAXON/JAXONmain_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/JAXON_for_torquecontrol.xml --timeStep 0.001 --dt 0.002 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find hrpsys_ros_bridge_tutorials`/models/JAXON_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge_tutorials jaxon.launch PROJECT_FILE:=/tmp/JAXON_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller

JAXON_RED example 4 : Use torque control simulation

Generate project file

openhrp-project-generator `rospack find jsk_models`/JAXON_RED/JAXON_REDmain_bush.wrl `rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl --use-highgain-mode false --output /tmp/JAXON_RED_for_torquecontrol.xml --timeStep 0.001 --dt 0.002 --method RUNGE_KUTTA

Launch with generated project file

export BUSH_CUSTOMIZER_CONFIG_PATH=`rospack find hrpsys_ros_bridge_tutorials`/models/JAXON_RED_bush_customizer_param.conf
rtmlaunch hrpsys_ros_bridge_tutorials jaxon_red.launch PROJECT_FILE:=/tmp/JAXON_RED_for_torquecontrol.xml hrpsys_precreate_rtc:=PDcontroller

For Torque-control + PD servo simulation

To execute torque-control and PD servi simulation,

Generate project file.

For example,

rtmtest -t hrpsys_tools _gen_project.launch INPUT:=${CVSDIR}/OpenHRP/etc/HRP2JSKNT_for_OpenHRP3/HRP2JSKNTmain.wrl OUTPUT:=/tmp/HRP2JSKNT_for_torquecontroller.xml OBJECT_MODELS:="`rospack find openhrp3`/share/OpenHRP-3.1/sample/model/longfloor.wrl" CORBA_PORT:=15005 USE_HIGHGAIN_MODE_OPTION:="--use-highgain-mode false" SIMULATION_TIMESTEP_OPTION:="--timestep 0.001" CONF_DT_OPTION:="--dt 0.004"

Write PDgain files and add file path to your conf file

For example, in HRP2JSKNT.conf,

...
pdgains_sim.file_name:/path/to/your/gain/file/HRP2JSKNT_hrpsys_sim_pdgain.sav # Add here

Execute launch file with PDcontroller

For example,

rtmlaunch hrpsys_ros_bridge_tutorials hrp2jsknt.launch PROJECT_FILE:=/tmp/HRP2JSKNT_for_torquecontroller.xml hrpsys_precreate_rtc:=PDcontroller

Write own your model files

Write own your model files as VRML file

Model Documentation (Japanese) Sample Model Description (Japanese) Model Documentation (English) Sample Model Description (English)

Model conversion in RTM-ROS system

Conversion overview

VRML, COLLADA, Euslisp, URDF

Wiki: rtmros_common/Tutorials/AddRobotsEnvironmentsHrpsysSimulator (last edited 2017-01-11 01:04:01 by ShunichiNozawa)