Skip to content

Commit 1753326

Browse files
committed
[hrpsys_choreonoid] add SampleRobot
1 parent 253eeca commit 1753326

File tree

9 files changed

+568
-2
lines changed

9 files changed

+568
-2
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,35 @@ source devel/setup.bash
4343
```
4444

4545
### run test
46+
If you get error, try `export ORBgiopMaxMsgSize=2097152000`.
47+
48+
#### SampleRobot
49+
```
50+
rtmlaunch hrpsys_choreonoid samplerobot_choreonoid.launch
51+
```
52+
Launch another terminal and send command to robot. (python)
53+
```
54+
ipython -i `rospack find hrpsys_choreonoid`/scripts/samplerobot_rh_setup.py "SampleRobot(Robot)0"
55+
hcf.abc_svc.goPos(1,0,0)
56+
```
57+
Launch another terminal and send command to robot. (euslisp)
58+
```
59+
roseus `rospack find hrpsys_ros_bridge`/euslisp/samplerobot-interface.l
60+
(samplerobot-init)
61+
(send *ri* :go-pos 1 0 0)
62+
(setq *robot* *sr*)
63+
(objects *robot*)
64+
(send *robot* :reset-manip-pose)
65+
(send *ri* :angle-vector (send *robot* :angle-vector) 5000)
66+
```
67+
68+
#### JAXON
69+
Build hrpsys_choreonoid_tutorials
4670
```
4771
catkin build hrpsys_choreonoid_tutorials
4872
source devel/setup.bash
73+
```
74+
```
4975
rtmlaunch hrpsys_choreonoid_tutorials jaxon_jvrc_choreonoid.launch
5076
```
5177
Launch another terminal and send command to robot. (python)
@@ -66,8 +92,6 @@ roseus `rospack find hrpsys_choreonoid_tutorials`/euslisp/jaxon_jvrc-interface.l
6692
(send *ri* :angle-vector (send *robot* :angle-vector) 5000)
6793
```
6894

69-
If you get error, try `export ORBgiopMaxMsgSize=2097152000`.
70-
7195
See also [hrpsys_choreonoid_tutorials/README.md](/hrpsys_choreonoid_tutorials/README.md)
7296

7397
---

hrpsys_choreonoid/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@ endif()
9696
add_subdirectory(iob)
9797

9898
add_custom_target(hrpsys_choreonoid_iob ALL DEPENDS RobotHardware_choreonoid)
99+
100+
101+
set(HRPSYS_CHOREONOID_DIRECTORY ${PROJECT_SOURCE_DIR})
102+
set(OPENHRP_SAMPLE_DIR ${openhrp3_PREFIX}/share/OpenHRP-3.1/sample)
103+
104+
###
105+
#SampleRobot conid
106+
###
107+
configure_file(${PROJECT_SOURCE_DIR}/config/SampleRobot_RH_LOAD_OBJ.cnoid.in ${PROJECT_SOURCE_DIR}/config/SampleRobot_RH_LOAD_OBJ.cnoid @ONLY)
108+
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
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
##
2+
name-server = localhost:15005
3+
##
4+
## PD Controller
5+
## in: angleRef, angle
6+
## out: torque
7+
##
8+
in-port = tauIn:JOINT_TORQUE
9+
out-port = angleOut:JOINT_VALUE
10+
out-port = qvel:JOINT_VELOCITY
11+
out-port = torque:JOINT_TORQUE
12+
# out-port = ddq:JOINT_ACCELERATION
13+
connection = tauIn:RobotHardware_choreonoid0:torqueOut
14+
connection = angleOut:RobotHardware_choreonoid0:angleIn
15+
connection = qvel:RobotHardware_choreonoid0:qvel_sim
16+
connection = torque:RobotHardware_choreonoid0:torque_sim
17+
###
18+
# debug ## ground truth robot potition
19+
###
20+
out-port = WAIST:WAIST:ABS_TRANSFORM
21+
####
22+
# sensors
23+
####
24+
out-port = rfsensor_sim:rfsensor:FORCE_SENSOR
25+
out-port = lfsensor_sim:lfsensor:FORCE_SENSOR
26+
out-port = rhsensor_sim:rhsensor:FORCE_SENSOR
27+
out-port = lhsensor_sim:lhsensor:FORCE_SENSOR
28+
out-port = gsensor_sim:gsensor:ACCELERATION_SENSOR2
29+
out-port = gyrometer_sim:gyrometer:RATE_GYRO_SENSOR2
30+
connection = rfsensor_sim:RobotHardware_choreonoid0:rfsensor_sim
31+
connection = lfsensor_sim:RobotHardware_choreonoid0:lfsensor_sim
32+
connection = rhsensor_sim:RobotHardware_choreonoid0:rhsensor_sim
33+
connection = lhsensor_sim:RobotHardware_choreonoid0:lhsensor_sim
34+
connection = gsensor_sim:RobotHardware_choreonoid0:gsensor_sim
35+
connection = gyrometer_sim:RobotHardware_choreonoid0:gyrometer_sim
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bush:
2+
springT: 3.3e5
3+
dampingT: 3.3e2
4+
springR: 2.5e3
5+
dampingR: 2.5

0 commit comments

Comments
 (0)