|
From: <kla...@us...> - 2013-04-12 09:05:05
|
Revision: 348
http://simspark.svn.sourceforge.net/simspark/?rev=348&view=rev
Author: klausdorer
Date: 2013-04-12 09:04:57 +0000 (Fri, 12 Apr 2013)
Log Message:
-----------
adjusted rsg files to be able to pass heterogeneous type information
introduced the possibility to specify different joint max speeds
added two heterogeneous types: longer leg and faster foot pitch
Modified Paths:
--------------
trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg
trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg
trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg
trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg
trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg
trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg
trunk/rcssserver3d/rcssserver3d/naorobottypes.rb
Modified: trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/hingejoint.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -6,14 +6,9 @@
$Path_Body1 $Path_Body2
$Anchor_X $Anchor_Y $Anchor_Z
$Axis_X $Axis_Y $Axis_Z
- $Min $Max
+ $MinDeg $MaxDeg
+ $MaxAbsSpeed
)
-
- (def $PI 3.14159265)
- ;(def $MinDeg (eval $Min * (eval 180.0 / $PI)))
- ;(def $MaxDeg (eval $Max * (eval 180.0 / $PI)))
- (def $MinDeg $Min)
- (def $MaxDeg $Max)
; There are 2 types of motor installed on the real Nao, each type has
; 2 types of "Reduction ratio".
@@ -23,7 +18,7 @@
; We don't need to follow them totally that different hingeeffector is using
; different types of motor.
; All the hingeeffector uses the 351.77
- (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0)))
+ ; (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0)))
;
;Hinge Joint Parameters
Modified: trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -106,7 +106,9 @@
;
;The neck and head part
;
- (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+ (importScene rsg/agent/nao/naoneckhead.rsg
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj
+ $type)
;
@@ -114,28 +116,32 @@
;
(importScene rsg/agent/nao/naoarm.rsg
1 r
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj
+ $type)
;
;The Left Arm
;
(importScene rsg/agent/nao/naoarm.rsg
-1 l
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj
+ $type)
;
;The Right Leg
;
(importScene rsg/agent/nao/naoleg.rsg
1 r
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj
+ $type)
;
;The Left Leg
;
(importScene rsg/agent/nao/naoleg.rsg
-1 l
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj
+ $type)
);end of nd Space
Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/naoarm.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -8,6 +8,7 @@
;
(templ $LRFactor $LeftOrRight
$Torso_X $Torso_Y $Torso_Z $loadObj
+ $type
)
;
@@ -91,8 +92,12 @@
;
;Joint Parameters
;
+ (def $PI 3.14159265)
+ (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0)))
+
(def $aj1_min -120)
(def $aj1_max 120)
+ (def $aj1_max_abs_speed $MaxAbsJointSpeed)
(def $right_aj2_min -95)
(def $left_aj2_min -1)
@@ -105,9 +110,11 @@
(def $aj2_max_c1 (eval (eval $right_aj2_max + $left_aj2_max) * 0.5))
(def $aj2_max_c2 (eval (eval $right_aj2_max - $left_aj2_max) * 0.5))
(def $aj2_max (eval $aj2_max_c1 + (eval $LRFactor * $aj2_max_c2)))
+ (def $aj2_max_abs_speed $MaxAbsJointSpeed)
(def $aj3_min -120)
(def $aj3_max 120)
+ (def $aj3_max_abs_speed $MaxAbsJointSpeed)
(def $right_aj4_min -1)
(def $left_aj4_min -90)
@@ -120,6 +127,7 @@
(def $aj4_max_c1 (eval (eval $right_aj4_max + $left_aj4_max) * 0.5))
(def $aj4_max_c2 (eval (eval $right_aj4_max - $left_aj4_max) * 0.5))
(def $aj4_max (eval $aj4_max_c1 + (eval $LRFactor * $aj4_max_c2)))
+ (def $aj4_max_abs_speed $MaxAbsJointSpeed)
(def $aj2_Anchor_X (eval -1 * $UpperarmRelShoulderX))
@@ -152,7 +160,8 @@
../sphereBody ../../body/boxBody
0 0 0
1 0 0 ;1 -1 -1
- $aj1_min $aj1_max)
+ $aj1_min $aj1_max
+ $aj1_max_abs_speed)
)
;
@@ -175,11 +184,12 @@
(importScene rsg/agent/nao/box_physics.rsg $UpperArmSizeX $UpperArmSizeY $UpperArmSizeZ $UpperArmMass)
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint2PerName $Joint2EffName
- ../boxBody $ShoulderBodyPath
- $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z
- 0 0 1 ;2 -1 -1
- $aj2_min $aj2_max)
+ $Joint2PerName $Joint2EffName
+ ../boxBody $ShoulderBodyPath
+ $aj2_Anchor_X $aj2_Anchor_Y $aj2_Anchor_Z
+ 0 0 1 ;2 -1 -1
+ $aj2_min $aj2_max
+ $aj2_max_abs_speed)
)
;
@@ -195,11 +205,12 @@
(importScene rsg/agent/nao/sphere_physics_nocollider.rsg $ElbowRadius $ElbowMass)
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint3PerName $Joint3EffName
- ../sphereBody $UpperarmBodyPath
- 0 0 0
- 0 1 0 ;1 -1 -1
- $aj3_min $aj3_max)
+ $Joint3PerName $Joint3EffName
+ ../sphereBody $UpperarmBodyPath
+ 0 0 0
+ 0 1 0 ;1 -1 -1
+ $aj3_min $aj3_max
+ $aj3_max_abs_speed)
)
;
@@ -221,11 +232,12 @@
(importScene rsg/agent/nao/box_physics.rsg $LowerArmSizeX $LowerArmSizeY $LowerArmSizeZ $LowerArmMass)
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint4PerName $Joint4EffName
- ../boxBody $ElbowBodyPath
- $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z
- 0 0 1 ;2 -1 -1
- $aj4_min $aj4_max)
+ $Joint4PerName $Joint4EffName
+ ../boxBody $ElbowBodyPath
+ $aj4_Anchor_X $aj4_Anchor_Y $aj4_Anchor_Z
+ 0 0 1 ;2 -1 -1
+ $aj4_min $aj4_max
+ $aj4_max_abs_speed)
(nd ObjectState
(setID $LowerarmName)
Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/naoleg.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -8,6 +8,7 @@
;
(templ $LRFactor $LeftOrRight
$Torso_X $Torso_Y $Torso_Z $loadObj
+ $type
)
;
@@ -56,7 +57,8 @@
(def $ThighRelHip2_X 0)
(def $ThighRelHip2_Y 0.01)
- (def $ThighRelHip2_Z -0.04)
+ ;(def $ThighRelHip2_Z -0.04)
+ (def $ThighRelHip2_Z (eval "NaoType["$type"]['ThighRelHip2_Z']"))
(def $ShankRelThigh_X 0)
(def $ShankRelThigh_Y 0.005)
@@ -125,8 +127,12 @@
;
;Joint Parameters
;
+ (def $PI 3.14159265)
+ (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0)))
+
(def $lj1_min -90)
(def $lj1_max 1)
+ (def $lj1_max_abs_speed $MaxAbsJointSpeed)
(def $right_lj2_min -45)
(def $left_lj2_min -25)
@@ -139,15 +145,19 @@
(def $lj2_max_c1 (eval (eval $right_lj2_max + $left_lj2_max) * 0.5))
(def $lj2_max_c2 (eval (eval $right_lj2_max - $left_lj2_max) * 0.5))
(def $lj2_max (eval $lj2_max_c1 + (eval $LRFactor * $lj2_max_c2)))
+ (def $lj2_max_abs_speed $MaxAbsJointSpeed)
(def $lj3_min -25)
(def $lj3_max 100)
+ (def $lj3_max_abs_speed $MaxAbsJointSpeed)
(def $lj4_min -130)
(def $lj4_max 1)
+ (def $lj4_max_abs_speed $MaxAbsJointSpeed)
(def $lj5_min -45)
(def $lj5_max 75)
+ (def $lj5_max_abs_speed (eval "NaoType["$type"]['lj5_max_abs_speed']"))
(def $right_lj6_min -25)
(def $left_lj6_min -45)
@@ -160,6 +170,7 @@
(def $lj6_max_c1 (eval (eval $right_lj6_max + $left_lj6_max) * 0.5))
(def $lj6_max_c2 (eval (eval $right_lj6_max - $left_lj6_max) * 0.5))
(def $lj6_max (eval $lj6_max_c1 + (eval $LRFactor * $lj6_max_c2)))
+ (def $lj6_max_abs_speed (eval "NaoType["$type"]['lj6_max_abs_speed']"))
(def $lj1_axis_x -0.7071)
(def $lj1_axis_y 0)
@@ -193,7 +204,8 @@
../sphereBody ../../body/boxBody
0 0 0
$lj1_axis_x $lj1_axis_y $lj1_axis_z
- $lj1_min $lj1_max)
+ $lj1_min $lj1_max
+ $lj1_max_abs_speed)
)
;
@@ -212,7 +224,8 @@
../sphereBody $Hip1BodyPath
0 0 0 ;anchor
0 1 0 ;axis
- $lj2_min $lj2_max)
+ $lj2_min $lj2_max
+ $lj2_max_abs_speed)
)
;
@@ -243,11 +256,12 @@
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint3PerName $Joint3EffName
- ../boxBody $Hip2BodyPath
- $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z
- 1 0 0 ;1 -1 -1
- $lj3_min $lj3_max)
+ $Joint3PerName $Joint3EffName
+ ../boxBody $Hip2BodyPath
+ $lj3_Anchor_X $lj3_Anchor_Y $lj3_Anchor_Z
+ 1 0 0 ;1 -1 -1
+ $lj3_min $lj3_max
+ $lj3_max_abs_speed)
)
@@ -277,11 +291,12 @@
)
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint4PerName $Joint4EffName
- ../boxBody $ThighBodyPath
- 0 -0.01 0.045
- 1 0 0 ;0 -1 -1
- $lj4_min $lj4_max)
+ $Joint4PerName $Joint4EffName
+ ../boxBody $ThighBodyPath
+ 0 -0.01 0.045
+ 1 0 0 ;0 -1 -1
+ $lj4_min $lj4_max
+ $lj4_max_abs_speed)
)
@@ -301,7 +316,8 @@
../sphereBody $ShankBodyPath
0 0 0
1 0 0 ;0 -1 -1
- $lj5_min $lj5_max)
+ $lj5_min $lj5_max
+ $lj5_max_abs_speed)
)
@@ -336,11 +352,12 @@
)
(importScene rsg/agent/nao/hingejoint.rsg
- $Joint6PerName $Joint6EffName
- ../boxBody $AnkleBodyPath
- 0 -0.03 0.035
- 0 1 0 ;1 -1 -1
- $lj6_min $lj6_max)
+ $Joint6PerName $Joint6EffName
+ ../boxBody $AnkleBodyPath
+ 0 -0.03 0.035
+ 0 1 0 ;1 -1 -1
+ $lj6_min $lj6_max
+ $lj6_max_abs_speed)
(nd ObjectState
(setID $FootName)
Modified: trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/naoneckhead.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -2,7 +2,9 @@
(RSG 0 1)
(
- (templ $Torso_X $Torso_Y $Torso_Z $loadObj)
+ (templ $Torso_X $Torso_Y $Torso_Z $loadObj
+ $type
+ )
;
;neck parameter
@@ -27,14 +29,19 @@
;
;Head effector 1 parameter
;
+ (def $PI 3.14159265)
+ (def $MaxAbsJointSpeed (eval $PI * (eval 351.77 / 180.0)))
+
(def $he1_min -120)
(def $he1_max 120)
+ (def $he1_max_abs_speed $MaxAbsJointSpeed)
;
;Head effector 2 parameter
;
(def $he2_min -45)
(def $he2_max 45)
+ (def $he2_max_abs_speed $MaxAbsJointSpeed)
;
;Begin construct neck
@@ -51,7 +58,8 @@
../capsuleBody ../../body/boxBody
0 0 0
0 0 1
- $he1_min $he1_max)
+ $he1_min $he1_max
+ $he1_max_abs_speed)
)
;
@@ -84,7 +92,8 @@
;../boxBody ../../body/boxBody
0 0 -0.005
1 0 0
- $he2_min $he2_max)
+ $he2_min $he2_max
+ $he2_max_abs_speed)
(nd RestrictedVisionPerceptor
(setViewCones 120 120)
Modified: trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/data/rsg/agent/nao/universaljoint.rsg 2013-04-12 09:04:57 UTC (rev 348)
@@ -9,6 +9,7 @@
$Axis2_X $Axis2_Y $Axis2_Z
$Min0 $Max0
$Min1 $Max1
+ $MaxAbsSpeed
)
(def $PI 3.14159265)
@@ -26,7 +27,6 @@
(def $Stop_ERP 0.8)
(def $FudgeFactor 1e-5)
(def $Bounce 1)
- (def $MaxAbsSpeed (eval $PI * (eval 351.77 / 180.0)))
(nd UniversalJoint
(attach $Path_Body1 $Path_Body2)
Modified: trunk/rcssserver3d/rcssserver3d/naorobottypes.rb
===================================================================
--- trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-03-30 00:43:18 UTC (rev 347)
+++ trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2013-04-12 09:04:57 UTC (rev 348)
@@ -1,6 +1,8 @@
NaoType = [
# Type 0 (Standard Nao)
-{'tl' => 0.1},
+{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395},
# Type 1
-{'tl' => 0.12}
+{'ThighRelHip2_Z' => -0.08, 'lj5_max_abs_speed' => 6.1395, 'lj6_max_abs_speed' => 6.1395},
+# Type 2
+{'ThighRelHip2_Z' => -0.04, 'lj5_max_abs_speed' => 9.21, 'lj6_max_abs_speed' => 4.605}
]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|