From 13d49839fd8f12b5c5160e1770a9f71deb00a898 Mon Sep 17 00:00:00 2001 From: Riku Shigematsu Date: Mon, 18 Jun 2018 20:00:19 +0900 Subject: [PATCH] add an example of checkerboard_box --- jvrc_models/models/checkerboard_3x6.png | Bin 0 -> 2144 bytes jvrc_models/models/checkerboard_4x5.png | Bin 0 -> 2132 bytes jvrc_models/models/checkerboard_box.wrl | 356 ++++++++++++++++++++++++ 3 files changed, 356 insertions(+) create mode 100644 jvrc_models/models/checkerboard_3x6.png create mode 100644 jvrc_models/models/checkerboard_4x5.png create mode 100644 jvrc_models/models/checkerboard_box.wrl diff --git a/jvrc_models/models/checkerboard_3x6.png b/jvrc_models/models/checkerboard_3x6.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb4e909162b07d04723c96da1d49d6cea3fce94 GIT binary patch literal 2144 zcmeAS@N?(olHy`uVBq!ia0y~yVC-UGVA{mN1{68Hf2J>x;wY#7I}FR xbcE-mx^0)Qx83SiAbe-EpoUjb(1Q9id+iSM@RvqX{lF#zgQu&X%Q~loCIDwHb8P?s literal 0 HcmV?d00001 diff --git a/jvrc_models/models/checkerboard_4x5.png b/jvrc_models/models/checkerboard_4x5.png new file mode 100644 index 0000000000000000000000000000000000000000..dbe4604184065179d9baf2474a6b3b00495bc137 GIT binary patch literal 2132 zcmeAS@N?(olHy`uVBq!ia0y~yV0_EKz!b#61{8UBVD2#>#aZAHSzpQztkchzfo1U9?OTU{f>8_C|Y}V*& z@-A`G4^@T-jK?|mq~LWmR_5Kbe-2827P?5%yHNfKOq;ZA>~n7tp% z0YkFE9UdjrFQaj%1MKAxq^QQ}4&27U{Qy*gt_r7dcq>_mQ?M9!Kzwq_TtgTe~DWM4f!qz?* literal 0 HcmV?d00001 diff --git a/jvrc_models/models/checkerboard_box.wrl b/jvrc_models/models/checkerboard_box.wrl new file mode 100644 index 00000000..2ccb62b8 --- /dev/null +++ b/jvrc_models/models/checkerboard_box.wrl @@ -0,0 +1,356 @@ +#VRML V2.0 utf8 + +PROTO Joint [ + exposedField SFVec3f center 0 0 0 + exposedField MFNode children [] + exposedField MFFloat llimit [] + exposedField MFFloat lvlimit [] + exposedField SFRotation limitOrientation 0 0 1 0 + exposedField SFString name "" + exposedField SFRotation rotation 0 0 1 0 + exposedField SFVec3f scale 1 1 1 + exposedField SFRotation scaleOrientation 0 0 1 0 + exposedField MFFloat stiffness [ 0 0 0 ] + exposedField SFVec3f translation 0 0 0 + exposedField MFFloat ulimit [] + exposedField MFFloat uvlimit [] + exposedField SFString jointType "" + exposedField SFInt32 jointId -1 + exposedField SFVec3f jointAxis 0 0 1 + + exposedField SFFloat gearRatio 1 + exposedField SFFloat rotorInertia 0 + exposedField SFFloat rotorResistor 0 + exposedField SFFloat torqueConst 1 + exposedField SFFloat encoderPulse 1 +] +{ + Transform { + center IS center + children IS children + rotation IS rotation + scale IS scale + scaleOrientation IS scaleOrientation + translation IS translation + } +} + +PROTO Segment [ + field SFVec3f bboxCenter 0 0 0 + field SFVec3f bboxSize -1 -1 -1 + exposedField SFVec3f centerOfMass 0 0 0 + exposedField MFNode children [ ] + exposedField SFNode coord NULL + exposedField MFNode displacers [ ] + exposedField SFFloat mass 0 + exposedField MFFloat momentsOfInertia [ 0 0 0 0 0 0 0 0 0 ] + exposedField SFString name "" + eventIn MFNode addChildren + eventIn MFNode removeChildren +] +{ + Group { + addChildren IS addChildren + bboxCenter IS bboxCenter + bboxSize IS bboxSize + children IS children + removeChildren IS removeChildren + } +} + +PROTO Humanoid [ + field SFVec3f bboxCenter 0 0 0 + field SFVec3f bboxSize -1 -1 -1 + exposedField SFVec3f center 0 0 0 + exposedField MFNode humanoidBody [ ] + exposedField MFString info [ ] + exposedField MFNode joints [ ] + exposedField SFString name "" + exposedField SFRotation rotation 0 0 1 0 + exposedField SFVec3f scale 1 1 1 + exposedField SFRotation scaleOrientation 0 0 1 0 + exposedField MFNode segments [ ] + exposedField MFNode sites [ ] + exposedField SFVec3f translation 0 0 0 + exposedField SFString version "1.1" + exposedField MFNode viewpoints [ ] +] +{ + Transform { + bboxCenter IS bboxCenter + bboxSize IS bboxSize + center IS center + rotation IS rotation + scale IS scale + scaleOrientation IS scaleOrientation + translation IS translation + children [ + Group { + children IS viewpoints + } + Group { + children IS humanoidBody + } + ] + } +} + +PROTO VisionSensor [ + exposedField SFVec3f translation 0 0 0 + exposedField SFRotation rotation 0 0 1 0 + exposedField MFNode children [ ] + exposedField SFFloat fieldOfView 0.785398 + exposedField SFString name "" + exposedField SFFloat frontClipDistance 0.01 + exposedField SFFloat backClipDistance 10.0 + exposedField SFString type "NONE" + exposedField SFInt32 sensorId -1 + exposedField SFInt32 width 320 + exposedField SFInt32 height 240 +] +{ + Transform { + rotation IS rotation + translation IS translation + children IS children + } +} + + +PROTO ForceSensor [ + exposedField SFVec3f maxForce -1 -1 -1 + exposedField SFVec3f maxTorque -1 -1 -1 + exposedField SFVec3f translation 0 0 0 + exposedField SFRotation rotation 0 0 1 0 + exposedField SFInt32 sensorId -1 +] +{ + Transform { + translation IS translation + rotation IS rotation + } +} + +PROTO Gyro [ + exposedField SFVec3f maxAngularVelocity -1 -1 -1 + exposedField SFVec3f translation 0 0 0 + exposedField SFRotation rotation 0 0 1 0 + exposedField SFInt32 sensorId -1 +] +{ + Transform { + translation IS translation + rotation IS rotation + } +} + +PROTO AccelerationSensor [ + exposedField SFVec3f maxAcceleration -1 -1 -1 + exposedField SFVec3f translation 0 0 0 + exposedField SFRotation rotation 0 0 1 0 + exposedField SFInt32 sensorId -1 +] +{ + Transform { + translation IS translation + rotation IS rotation + } +} + +PROTO PressureSensor [ + exposedField SFFloat maxPressure -1 + exposedField SFVec3f translation 0 0 0 + exposedField SFRotation rotation 0 0 1 0 + exposedField SFInt32 sensorId -1 +] +{ + Transform { + translation IS translation + rotation IS rotation + } +} + +PROTO PhotoInterrupter [ + exposedField SFVec3f transmitter 0 0 0 + exposedField SFVec3f receiver 0 0 0 + exposedField SFInt32 sensorId -1 +] +{ + Transform{ + children [ + Transform{ + translation IS transmitter + } + Transform{ + translation IS receiver + } + ] + } +} + +PROTO CylinderSensorZ [ + exposedField SFFloat maxAngle -1 + exposedField SFFloat minAngle 0 + exposedField MFNode children [ ] +] +{ + Transform{ + rotation 1 0 0 1.5708 + children [ + DEF SensorY CylinderSensor{ + maxAngle IS maxAngle + minAngle IS minAngle + } + DEF AxisY Transform{ + children [ + Transform{ + rotation 1 0 0 -1.5708 + children IS children + } + ] + } + ] + } + ROUTE SensorY.rotation_changed TO AxisY.set_rotation +} + +PROTO CylinderSensorY [ + exposedField SFFloat maxAngle -1 + exposedField SFFloat minAngle 0 + exposedField MFNode children [ ] +] +{ + Transform{ + rotation 0 1 0 1.5708 + children [ + DEF SensorX CylinderSensor{ + maxAngle IS maxAngle + minAngle IS minAngle + } + DEF AxisX Transform{ + children [ + Transform{ + rotation 0 1 0 -1.5708 + children IS children + } + ] + } + ] + } + ROUTE SensorX.rotation_changed TO AxisX.set_rotation +} + +PROTO CylinderSensorX [ + exposedField SFFloat maxAngle -1 + exposedField SFFloat minAngle 0 + exposedField MFNode children [ ] +] +{ + Transform{ + rotation 0 0 1 -1.5708 + children [ + DEF SensorZ CylinderSensor{ + maxAngle IS maxAngle + minAngle IS minAngle + } + DEF AxisZ Transform{ + children [ + Transform{ + rotation 0 0 1 1.5708 + children IS children + } + ] + } + ] + } + ROUTE SensorZ.rotation_changed TO AxisZ.set_rotation +} + +NavigationInfo { + avatarSize 0.5 + headlight TRUE + type ["EXAMINE", "ANY"] +} + +Background { + skyColor 0.4 0.6 0.4 +} + +Viewpoint { + position 3 0 0.835 + orientation 0.5770 0.5775 0.5775 2.0935 +} + +DEF shigematsu_box Humanoid { + humanoidBody [ + DEF WAIST Joint { + jointType "free" ## + translation 0 0 0 + rotation 0 1 0 0 + children [ + DEF BODY Segment { + mass 1.0 + momentsOfInertia [0.2 0 0 0 0.2 0 0 0 0.2] + children [ ### geometry + Transform { + scale 1.0 1.0 1.0 + children [ + Shape { + appearance Appearance { + material Material { + diffuseColor 0 0.9 0.0 + } + } + geometry Box { + size 0.4 0.4 0.4 + } + } # Shape + ] + } + Transform { + translation 0 0 0.2 + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url "checkerboard_3x6.png" + repeatS FALSE + repeatT FALSE + } + } + geometry Box { + size 0.2 0.35 0.01 + } + } # Shape + ] + } + Transform { + translation -0.2 0 0 + children [ + Shape { + appearance Appearance { + texture ImageTexture { + url "checkerboard_4x5.png" + repeatS FALSE + repeatT FALSE + } + } + geometry Box { + size 0.01 0.3 0.25 + } + } # Shape + ] + } + ] + } + ] + } + ] + joints [ + USE WAIST + ] + name "shigematsu_box" + segments [ + USE BODY + ] +}