Skip to content

Commit

Permalink
Merge pull request start-jsk#203 from YoheiKakiuchi/add_obj_yaml
Browse files Browse the repository at this point in the history
Add obj yaml
  • Loading branch information
YoheiKakiuchi authored Aug 4, 2016
2 parents 4f827ad + 11b53a3 commit b3a3498
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hrpsys_choreonoid/launch/choreonoid.launch
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
name="enable_const" value="" />
<node pkg="hrpsys_choreonoid" type="run_choreonoid.sh" name="choreonoid"
output="screen"
args="$(arg PROJECT_FILE) $(arg enable_const) $(arg start_sim) $(arg RTC_ARGS)" />
args="$(arg PROJECT_FILE) --add-objects $(arg enable_const) $(arg start_sim) $(arg RTC_ARGS)" />
</launch>
4 changes: 3 additions & 1 deletion hrpsys_choreonoid/launch/run_choreonoid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ for arg in $@; do
enable_const="--python $(rospack find hrpsys_choreonoid)/launch/constraint_enable.py"
fi
if [ $arg = "--add-objects" ]; then
add_objects="--python $(rospack find hrpsys_choreonoid)/launch/add_objects.py"
if [ "${EXTRA_CHOREONOID_OBJS}" != "" ]; then
add_objects="--python $(rospack find hrpsys_choreonoid)/launch/add_objects.py"
fi
fi
done

Expand Down
8 changes: 7 additions & 1 deletion hrpsys_choreonoid_tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@ configure_file(${PROJECT_SOURCE_DIR}/config/JAXON_RED_VALVE.cnoid.in ${PROJECT_S
configure_file(${PROJECT_SOURCE_DIR}/config/JAXON_RED_DRCBOX.cnoid.in ${PROJECT_SOURCE_DIR}/config/JAXON_RED_DRCBOX.cnoid @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/config/JAXON_RED_DOOR.cnoid.in ${PROJECT_SOURCE_DIR}/config/JAXON_RED_DOOR.cnoid @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/config/JAXON_RED_RH_FLAT.cnoid.in ${PROJECT_SOURCE_DIR}/config/JAXON_RED_RH_FLAT.cnoid @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/config/JAXON_RED_LOAD_OBJ.cnoid.in ${PROJECT_SOURCE_DIR}/config/JAXON_RED_LOAD_OBJ.cnoid @ONLY)

###
#CHIDORI conid
###
configure_file(${PROJECT_SOURCE_DIR}/config/CHIDORI_RH_FLAT.cnoid.in ${PROJECT_SOURCE_DIR}/config/CHIDORI_RH_FLAT.cnoid @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/config/CHIDORI_RH_FLAT.cnoid.in ${PROJECT_SOURCE_DIR}/config/CHIDORI_RH_FLAT.cnoid @ONLY)

###
# scene.yaml
###
configure_file(${PROJECT_SOURCE_DIR}/config/flat.yaml.in ${PROJECT_SOURCE_DIR}/config/flat.yaml @ONLY)
5 changes: 5 additions & 0 deletions hrpsys_choreonoid_tutorials/config/flat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
obj1:
name: 'VISIBLE_FLOOR'
file: '/home/leus/ros/indigo/src/rtm-ros-robotics/rtmros_choreonoid/jvrc_models/models/visible_floor.wrl'
translation: [0, 0, -0.1]
rotation: [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
12 changes: 11 additions & 1 deletion hrpsys_choreonoid_tutorials/launch/jaxon_red_choreonoid.launch
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<launch>
<arg name="TASK" default="FLAT" />
<arg name="USE_ROBOTHARDWARE" default="false" />
<arg name="ENVIRONMENT_YAML" default="$(find hrpsys_choreonoid_tutorials)/config/flat.yaml" />
<arg name="LOAD_OBJECTS" default="false" />

<arg name="KILL_SERVERS" default="false" />
<arg name="NOSIM" default="false" />
<arg name="REALTIME" default="true" />
<arg name="RUN_RVIZ" default="true" />
<arg name="GUI" default="true" />
<arg name="hrpsys_precreate_rtc" default=""/>

<!-- robot dependant settings -->
<arg if="$(arg USE_ROBOTHARDWARE)"
name="taskname" value="RH_$(arg TASK)" />
<arg unless="$(arg USE_ROBOTHARDWARE)"
name="taskname" value="$(arg TASK)" />
<arg name="PROJECT_FILE" default="$(find hrpsys_choreonoid_tutorials)/config/JAXON_RED_$(arg taskname).cnoid" />
<arg if="$(arg LOAD_OBJECTS)"
name="taskname_last" value="LOAD_OBJ" />
<arg unless="$(arg LOAD_OBJECTS)"
name="taskname_last" value="$(arg taskname)" />
<env if="$(arg LOAD_OBJECTS)"
name="EXTRA_CHOREONOID_OBJS" value="$(arg ENVIRONMENT_YAML)" />

<arg name="PROJECT_FILE" default="$(find hrpsys_choreonoid_tutorials)/config/JAXON_RED_$(arg taskname_last).cnoid" />
<arg name="SIMULATOR_NAME" default="JAXON_RED(Robot)0" />
<arg if="$(arg USE_ROBOTHARDWARE)"
name="BRIDGE_SIMULATOR_NAME" default="RobotHardware_choreonoid0" />
Expand Down
4 changes: 2 additions & 2 deletions jvrc_models/models/handle.wrl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#VRML V2.0 utf8
Transform {
scale 1.0 1.0 1.0
translation 0.0 0.0 0.0
translation 0.0 -0.05 0.0
rotation 0 1 0 0
children [
Shape {
Expand All @@ -15,4 +15,4 @@ Transform {
}
} # Shape
]
}
}
4 changes: 2 additions & 2 deletions jvrc_models/models/valve_box.wrl
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ DEF VALVE_BOX Humanoid {
]
} ## Joint VALVE_BOX_JOINT0
DEF VALVE_BOX_JOINT1 Joint { ## handle-rotation
translation -0.3 -0.5 1.0
translation -0.3 -0.5 1.0
jointAxis 0 1 0
jointType "fixed"
jointType "rotate"
jointId 1
#ulimit 1
#llimit -1
Expand Down

0 comments on commit b3a3498

Please sign in to comment.