Revision: 4440
http://playerstage.svn.sourceforge.net/playerstage/?rev=4440&view=rev
Author: natepak
Date: 2008-03-25 18:04:24 -0700 (Tue, 25 Mar 2008)
Log Message:
-----------
Adding in stereo vision
Modified Paths:
--------------
code/gazebo/trunk/player/CameraInterface.cc
code/gazebo/trunk/worlds/models/bandit.model
Added Paths:
-----------
code/gazebo/trunk/worlds/stereocamera.world
Modified: code/gazebo/trunk/player/CameraInterface.cc
===================================================================
--- code/gazebo/trunk/player/CameraInterface.cc 2008-03-26 01:04:07 UTC (rev
4439)
+++ code/gazebo/trunk/player/CameraInterface.cc 2008-03-26 01:04:24 UTC (rev
4440)
@@ -101,31 +101,24 @@
unsigned int oldCount = this->data.image_count;
this->data.image_count = this->iface->data->image_size;
- printf("Iface Image Size[%d]\n", this->iface->data->image_size);
-
if (oldCount != this->data.image_count)
{
delete this->data.image;
this->data.image = new uint8_t[this->data.image_count];
- printf("Created array of size[%d]\n",this->data.image_count);
}
- printf("1\n");
// Set the image pixels
memcpy(this->data.image, this->iface->data->image,
this->iface->data->image_size);
- printf("2\n");
size = sizeof(this->data) - sizeof(this->data.image) +
this->iface->data->image_size;
- printf("3\n");
// Send data to server
this->driver->Publish(this->device_addr,
PLAYER_MSGTYPE_DATA,
PLAYER_CAMERA_DATA_STATE,
(void*)&this->data, size, &this->datatime);
- printf("4\n");
// Save frames
if (this->save)
Modified: code/gazebo/trunk/worlds/models/bandit.model
===================================================================
--- code/gazebo/trunk/worlds/models/bandit.model 2008-03-26 01:04:07 UTC
(rev 4439)
+++ code/gazebo/trunk/worlds/models/bandit.model 2008-03-26 01:04:24 UTC
(rev 4440)
@@ -183,7 +183,7 @@
<body1>right_shoulder_body</body1>
<body2>right_bicep_body</body2>
<anchor>right_shoulder_body</anchor>
- <anchorOffset>0 0 -0.052</anchorOffset>
+ <anchorOffset>0 0.0 -0.052</anchorOffset>
<axis>0 0 1</axis>
<lowStop>-90</lowStop>
<highStop>90</highStop>
Added: code/gazebo/trunk/worlds/stereocamera.world
===================================================================
--- code/gazebo/trunk/worlds/stereocamera.world (rev 0)
+++ code/gazebo/trunk/worlds/stereocamera.world 2008-03-26 01:04:24 UTC (rev
4440)
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+
+<gazebo:world
+ xmlns:gazebo="http://playerstage.sourceforge.net/gazebo/xmlschema/#gz"
+ xmlns:model="http://playerstage.sourceforge.net/gazebo/xmlschema/#model"
+ xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
+ xmlns:body="http://playerstage.sourceforge.net/gazebo/xmlschema/#body"
+ xmlns:geom="http://playerstage.sourceforge.net/gazebo/xmlschema/#geom"
+ xmlns:joint="http://playerstage.sourceforge.net/gazebo/xmlschema/#joint"
+
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
+
xmlns:rendering="http://playerstage.sourceforge.net/gazebo/xmlschema/#rendering"
+
xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
+ xmlns:physics="http://playerstage.sourceforge.net/gazebo/xmlschema/#physics"
>
+
+ <verbosity>5</verbosity>
+
+ <physics:ode>
+ <stepTime>0.03</stepTime>
+ <gravity>0 0 -9.8</gravity>
+ <cfm>0.008</cfm>
+ <erp>0.2</erp>
+ </physics:ode>
+
+ <rendering:gui>
+ <type>fltk</type>
+ <size>800 600</size>
+ <pos>0 0</pos>
+ </rendering:gui>
+
+ <rendering:ogre>
+ <ambient>1.0 1.0 1.0 1.0</ambient>
+ <sky>
+ <material>Gazebo/CloudySky</material>
+ </sky>
+
+ </rendering:ogre>
+
+ <model:physical name="sphere1_model">
+ <xyz>1 0 1.5</xyz>
+ <rpy>0.0 0.0 0.0</rpy>
+ <static>false</static>
+
+ <body:sphere name="sphere1_body">
+ <geom:sphere name="sphere1_geom">
+ <size>0.5</size>
+ <mass>1.0</mass>
+
+ <visual>
+ <scale>0.5 0.5 0.5</scale>
+ <mesh>unit_sphere</mesh>
+ <material>Gazebo/Rocky</material>
+ </visual>
+ </geom:sphere>
+ </body:sphere>
+ </model:physical>
+
+ <model:physical name="box1_model">
+ <xyz>1 1.5 0.5</xyz>
+ <canonicalBody>box1_body</canonicalBody>
+ <static>false</static>
+
+ <body:box name="box1_body">
+
+ <geom:box name="box1_geom">
+ <size>1 1 1</size>
+ <mass>1.0</mass>
+ <visual>
+ <mesh>unit_box</mesh>
+ <material>Gazebo/BumpyMetal</material>
+ </visual>
+ </geom:box>
+ </body:box>
+ </model:physical>
+
+ <!-- Ground Plane -->
+ <model:physical name="plane1_model">
+ <xyz>0 0 0</xyz>
+ <rpy>0 0 0</rpy>
+ <static>true</static>
+
+ <body:plane name="plane1_body">
+ <geom:plane name="plane1_geom">
+ <normal>0 0 1</normal>
+ <size>2000 2000</size>
+ <segments>10 10</segments>
+ <uvTile>100 100</uvTile>
+ <material>Gazebo/GrassFloor</material>
+ </geom:plane>
+ </body:plane>
+ </model:physical>
+
+ <model:physical name="cam1_model">
+ <xyz>-6 0 3.5</xyz>
+ <rpy>0 28 0</rpy>
+ <static>true</static>
+
+ <body:empty name="cam1_body">
+ <sensor:stereocamera name="cam1_sensor">
+ <imageSize>800 600</imageSize>
+ <hfov>60</hfov>
+ <nearClip>0.1</nearClip>
+ <farClip>100</farClip>
+ <saveFrames>false</saveFrames>
+ <saveFramePath>frames</saveFramePath>
+ </sensor:stereocamera>
+ </body:empty>
+ </model:physical>
+
+</gazebo:world>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit