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

[hrpsys_choreonoid] Add SampleRobot #355

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,35 @@ source devel/setup.bash
```

### run test
If you get error, try `export ORBgiopMaxMsgSize=2097152000`.

#### SampleRobot
```
rtmlaunch hrpsys_choreonoid samplerobot_choreonoid.launch
```
Launch another terminal and send command to robot. (python)
```
ipython -i `rospack find hrpsys_choreonoid`/scripts/samplerobot_rh_setup.py "SampleRobot(Robot)0"
hcf.abc_svc.goPos(1,0,0)
```
Launch another terminal and send command to robot. (euslisp)
```
roseus `rospack find hrpsys_ros_bridge`/euslisp/samplerobot-interface.l
(samplerobot-init)
(send *ri* :go-pos 1 0 0)
(setq *robot* *sr*)
(objects *robot*)
(send *robot* :reset-manip-pose)
(send *ri* :angle-vector (send *robot* :angle-vector) 5000)
```

#### JAXON
Build hrpsys_choreonoid_tutorials
```
catkin build hrpsys_choreonoid_tutorials
source devel/setup.bash
```
```
rtmlaunch hrpsys_choreonoid_tutorials jaxon_jvrc_choreonoid.launch
```
Launch another terminal and send command to robot. (python)
Expand All @@ -66,8 +92,6 @@ roseus `rospack find hrpsys_choreonoid_tutorials`/euslisp/jaxon_jvrc-interface.l
(send *ri* :angle-vector (send *robot* :angle-vector) 5000)
```

If you get error, try `export ORBgiopMaxMsgSize=2097152000`.

See also [hrpsys_choreonoid_tutorials/README.md](/hrpsys_choreonoid_tutorials/README.md)

---
Expand Down
10 changes: 10 additions & 0 deletions hrpsys_choreonoid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,13 @@ endif()
add_subdirectory(iob)

add_custom_target(hrpsys_choreonoid_iob ALL DEPENDS RobotHardware_choreonoid)


set(HRPSYS_CHOREONOID_DIRECTORY ${PROJECT_SOURCE_DIR})
set(OPENHRP_SAMPLE_DIR ${openhrp3_PREFIX}/share/OpenHRP-3.1/sample)

###
#SampleRobot conid
###
configure_file(${PROJECT_SOURCE_DIR}/config/SampleRobot_RH_LOAD_OBJ.cnoid.in ${PROJECT_SOURCE_DIR}/config/SampleRobot_RH_LOAD_OBJ.cnoid @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/launch/samplerobot_choreonoid.launch.in ${PROJECT_SOURCE_DIR}/launch/samplerobot_choreonoid.launch @ONLY) #OPENHRP_SAMPLE_DIR is difficult to find in roslaunch api
35 changes: 35 additions & 0 deletions hrpsys_choreonoid/config/BodyRTC_SampleRobot.RH.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
##
name-server = localhost:15005
##
## PD Controller
## in: angleRef, angle
## out: torque
##
in-port = tauIn:JOINT_TORQUE
out-port = angleOut:JOINT_VALUE
out-port = qvel:JOINT_VELOCITY
out-port = torque:JOINT_TORQUE
# out-port = ddq:JOINT_ACCELERATION
connection = tauIn:RobotHardware_choreonoid0:torqueOut
connection = angleOut:RobotHardware_choreonoid0:angleIn
connection = qvel:RobotHardware_choreonoid0:qvel_sim
connection = torque:RobotHardware_choreonoid0:torque_sim
###
# debug ## ground truth robot potition
###
out-port = WAIST:WAIST:ABS_TRANSFORM
####
# sensors
####
out-port = rfsensor_sim:rfsensor:FORCE_SENSOR
out-port = lfsensor_sim:lfsensor:FORCE_SENSOR
out-port = rhsensor_sim:rhsensor:FORCE_SENSOR
out-port = lhsensor_sim:lhsensor:FORCE_SENSOR
out-port = gsensor_sim:gsensor:ACCELERATION_SENSOR2
out-port = gyrometer_sim:gyrometer:RATE_GYRO_SENSOR2
connection = rfsensor_sim:RobotHardware_choreonoid0:rfsensor_sim
connection = lfsensor_sim:RobotHardware_choreonoid0:lfsensor_sim
connection = rhsensor_sim:RobotHardware_choreonoid0:rhsensor_sim
connection = lhsensor_sim:RobotHardware_choreonoid0:lhsensor_sim
connection = gsensor_sim:RobotHardware_choreonoid0:gsensor_sim
connection = gyrometer_sim:RobotHardware_choreonoid0:gyrometer_sim
5 changes: 5 additions & 0 deletions hrpsys_choreonoid/config/SampleRobotCustomizer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bush:
springT: 3.3e5
dampingT: 3.3e2
springR: 2.5e3
dampingR: 2.5
Loading