|
From: <he...@us...> - 2012-11-26 20:25:56
|
Revision: 329
http://simspark.svn.sourceforge.net/simspark/?rev=329&view=rev
Author: hedayat
Date: 2012-11-26 20:25:49 +0000 (Mon, 26 Nov 2012)
Log Message:
-----------
Added changed to enable heterogeneous Nao robots
Modified Paths:
--------------
trunk/rcssserver3d/ChangeLog
trunk/rcssserver3d/rcssserver3d/CMakeLists.txt
trunk/rcssserver3d/rcssserver3d/naosoccersim.rb
Added Paths:
-----------
trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg
trunk/rcssserver3d/rcssserver3d/naorobottypes.rb
Removed Paths:
-------------
trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg
Modified: trunk/rcssserver3d/ChangeLog
===================================================================
--- trunk/rcssserver3d/ChangeLog 2012-11-24 15:19:21 UTC (rev 328)
+++ trunk/rcssserver3d/ChangeLog 2012-11-26 20:25:49 UTC (rev 329)
@@ -1,3 +1,14 @@
+2012-11-25 Hedayat Vatankhah <hed...@gm...>
+
+ * data/rsg/agent/nao/nao_hetero.rsg:
+ - nao_hetero.rsg can be used to create different variants of Nao robot
+ - nao.rsg a compatbility scene to create default Nao type (type 0)
+
+ * rcssserver3d/naorobottypes.rb:
+ * rcssserver3d/naosoccersim.rb:
+ * rcssserver3d/CMakeLists.txt:
+ - added naorobottypes.rb to initialize Nao heterogeneous robot parameters
+
2012-06-21 Hedayat Vatankhah <hed...@gm...>
* plugin/soccer/soccerruleaspect/soccerruleaspect.cpp:
Deleted: trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2012-11-24 15:19:21 UTC (rev 328)
+++ trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg 2012-11-26 20:25:49 UTC (rev 329)
@@ -1,138 +0,0 @@
-; -*- mode: lisp; -*-
-
-;
-; nao robot description file.
-;
-
-(RSG 0 1)
-(
-
-;
-; The torso parameters
-;
-
-(def $TorsoLength 0.1)
-(def $TorsoWidth 0.1)
-(def $TorsoHeight 0.18)
-(def $TorsoMass 1.2171)
-
-(def $TorsoInitX 0)
-(def $TorsoInitY -1)
-(def $TorsoInitZ 1.5)
-
-(def $loadObj (eval Nao.UseTexture))
-;
-;Begin Construct of Nao
-;
-(nd Space
- (setName spacenao)
- (disableInnerCollision true)
-
- ;
- ;The torso part
- ;
- (nd AgentAspect
- (setName body)
- (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ)
-
- (switch $loadObj
- (true
- (nd Transform
- (setLocalRotation -90 0 180)
- (nd StaticMesh
- (load 'models/naobody.obj')
- (setScale $TorsoLength $TorsoLength $TorsoLength)
- )
- )
- )
-
- (false
- (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey)
- )
- )
-
- ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass)
- (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass)
- (nd BoxCollider
- (setName TorsoCollider)
- (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight)
- (importScene rsg/agent/nao/contactjointhandler.rsg)
- )
-
- ;Install effectors and perceptors
- (nd StaticMeshInitEffector)
-
- (nd TimePerceptor)
-
- (nd AgentState
- (setName AgentState)
- (nd GameStatePerceptor)
- (nd HearPerceptor)
- (nd Transform
- (nd Cylinder
- (setName SelectionMarker)
- (setParams 1.0 1.0)
- (setScale 0.2 0.2 0.02)
- (setMaterial matSelect)
- (setTransparent)
- )
- )
- )
-
- (nd GyroRatePerceptor (setName torso))
- (nd Accelerometer (setName torso))
-
- ;(nd HMDPPerceptor)
- ;(nd HMDPEffector)
-
- (nd BeamEffector)
-
- (nd SayEffector)
-
- ;(nd VisionPerceptor
- ; (setSenseMyPos false)
- ; (setStaticSenseAxis false)
- ; (addNoise false))
-
- (nd AgentSyncEffector)
-
- );end of AgentAspect
-
-
- ;
- ;The neck and head part
- ;
- (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
-
-
- ;
- ;The Right Arm
- ;
- (importScene rsg/agent/nao/naoarm.rsg
- 1 r
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
-
- ;
- ;The Left Arm
- ;
- (importScene rsg/agent/nao/naoarm.rsg
- -1 l
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
-
- ;
- ;The Right Leg
- ;
- (importScene rsg/agent/nao/naoleg.rsg
- 1 r
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
-
- ;
- ;The Left Leg
- ;
- (importScene rsg/agent/nao/naoleg.rsg
- -1 l
- $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
-
-);end of nd Space
-
-);end of RSG 0 1
Copied: trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (from rev 317, trunk/rcssserver3d/data/rsg/agent/nao/nao.rsg)
===================================================================
--- trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg (rev 0)
+++ trunk/rcssserver3d/data/rsg/agent/nao/nao_hetero.rsg 2012-11-26 20:25:49 UTC (rev 329)
@@ -0,0 +1,142 @@
+; -*- mode: lisp; -*-
+
+;
+; nao robot description file.
+;
+
+(RSG 0 1)
+(
+
+(templ $type)
+
+;
+; The torso parameters
+;
+
+;(def $TorsoLength (eval "NaoType["$type"]['tl']"))
+
+(def $TorsoLength 0.1)
+(def $TorsoWidth 0.1)
+(def $TorsoHeight 0.18)
+(def $TorsoMass 1.2171)
+
+(def $TorsoInitX 0)
+(def $TorsoInitY -1)
+(def $TorsoInitZ 1.5)
+
+(def $loadObj (eval Nao.UseTexture))
+;
+;Begin Construct of Nao
+;
+(nd Space
+ (setName spacenao)
+ (disableInnerCollision true)
+
+ ;
+ ;The torso part
+ ;
+ (nd AgentAspect
+ (setName body)
+ (setLocalPos $TorsoInitX $TorsoInitY $TorsoInitZ)
+
+ (switch $loadObj
+ (true
+ (nd Transform
+ (setLocalRotation -90 0 180)
+ (nd StaticMesh
+ (load 'models/naobody.obj')
+ (setScale $TorsoLength $TorsoLength $TorsoLength)
+ )
+ )
+ )
+
+ (false
+ (importScene rsg/agent/nao/box_appearance.rsg $TorsoLength $TorsoWidth $TorsoHeight matGrey)
+ )
+ )
+
+ ;(importScene rsg/agent/nao/box_physics.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass)
+ (importScene rsg/agent/nao/box_physics_nocollider.rsg $TorsoLength $TorsoWidth $TorsoHeight $TorsoMass)
+ (nd BoxCollider
+ (setName TorsoCollider)
+ (setBoxLengths $TorsoLength $TorsoWidth $TorsoHeight)
+ (importScene rsg/agent/nao/contactjointhandler.rsg)
+ )
+
+ ;Install effectors and perceptors
+ (nd StaticMeshInitEffector)
+
+ (nd TimePerceptor)
+
+ (nd AgentState
+ (setName AgentState)
+ (nd GameStatePerceptor)
+ (nd HearPerceptor)
+ (nd Transform
+ (nd Cylinder
+ (setName SelectionMarker)
+ (setParams 1.0 1.0)
+ (setScale 0.2 0.2 0.02)
+ (setMaterial matSelect)
+ (setTransparent)
+ )
+ )
+ )
+
+ (nd GyroRatePerceptor (setName torso))
+ (nd Accelerometer (setName torso))
+
+ ;(nd HMDPPerceptor)
+ ;(nd HMDPEffector)
+
+ (nd BeamEffector)
+
+ (nd SayEffector)
+
+ ;(nd VisionPerceptor
+ ; (setSenseMyPos false)
+ ; (setStaticSenseAxis false)
+ ; (addNoise false))
+
+ (nd AgentSyncEffector)
+
+ );end of AgentAspect
+
+
+ ;
+ ;The neck and head part
+ ;
+ (importScene rsg/agent/nao/naoneckhead.rsg $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+
+
+ ;
+ ;The Right Arm
+ ;
+ (importScene rsg/agent/nao/naoarm.rsg
+ 1 r
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+
+ ;
+ ;The Left Arm
+ ;
+ (importScene rsg/agent/nao/naoarm.rsg
+ -1 l
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+
+ ;
+ ;The Right Leg
+ ;
+ (importScene rsg/agent/nao/naoleg.rsg
+ 1 r
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+
+ ;
+ ;The Left Leg
+ ;
+ (importScene rsg/agent/nao/naoleg.rsg
+ -1 l
+ $TorsoInitX $TorsoInitY $TorsoInitZ $loadObj)
+
+);end of nd Space
+
+);end of RSG 0 1
Modified: trunk/rcssserver3d/rcssserver3d/CMakeLists.txt
===================================================================
--- trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2012-11-24 15:19:21 UTC (rev 328)
+++ trunk/rcssserver3d/rcssserver3d/CMakeLists.txt 2012-11-26 20:25:49 UTC (rev 329)
@@ -27,7 +27,7 @@
########### install files ###############
-install(FILES rcssserver3d.rb soccersim.rb naosoccersim.rb
+install(FILES rcssserver3d.rb soccersim.rb naosoccersim.rb naorobottypes.rb
internalsoccermonitor.rb internalsoccerbindings.rb
DESTINATION ${DATADIR}/${CMAKE_PROJECT_NAME})
Added: trunk/rcssserver3d/rcssserver3d/naorobottypes.rb
===================================================================
--- trunk/rcssserver3d/rcssserver3d/naorobottypes.rb (rev 0)
+++ trunk/rcssserver3d/rcssserver3d/naorobottypes.rb 2012-11-26 20:25:49 UTC (rev 329)
@@ -0,0 +1,6 @@
+NaoType = [
+# Type 0 (Standard Nao)
+{'tl' => 0.1},
+# Type 1
+{'tl' => 0.12}
+]
Modified: trunk/rcssserver3d/rcssserver3d/naosoccersim.rb
===================================================================
--- trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-11-24 15:19:21 UTC (rev 328)
+++ trunk/rcssserver3d/rcssserver3d/naosoccersim.rb 2012-11-26 20:25:49 UTC (rev 329)
@@ -129,3 +129,6 @@
# install the TrainerCommandParser to parse commands received from a
# monitor client
sparkRegisterMonitorCmdParser 'TrainerCommandParser'
+
+# Load parameters for heterogeneous Nao robots
+run "naorobottypes.rb"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|