Revision: 6948 http://playerstage.svn.sourceforge.net/playerstage/?rev=6948&view=rev Author: natepak Date: 2008-08-10 21:12:29 +0000 (Sun, 10 Aug 2008)
Log Message: ----------- Fixed simulation interface updating Modified Paths: -------------- code/gazebo/trunk/libgazebo/gazebo.h code/gazebo/trunk/player/SimulationInterface.cc code/gazebo/trunk/server/World.cc code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc code/gazebo/trunk/worlds/simpleshapes.world Modified: code/gazebo/trunk/libgazebo/gazebo.h =================================================================== --- code/gazebo/trunk/libgazebo/gazebo.h 2008-08-10 18:26:25 UTC (rev 6947) +++ code/gazebo/trunk/libgazebo/gazebo.h 2008-08-10 21:12:29 UTC (rev 6948) @@ -1368,18 +1368,6 @@ /// Vertical field of view of the camera in radians public: double vfov; - // Left image size - public: unsigned int left_rgb_size; - - /// left image (R8G8B8) - public: unsigned char left_rgb[GAZEBO_STEREO_CAMERA_MAX_RGB_SIZE]; - - /// Right image size - public: unsigned int right_rgb_size; - - /// Right image (R8G8B8) - public: unsigned char right_rgb[GAZEBO_STEREO_CAMERA_MAX_RGB_SIZE]; - /// Left depth map size public: unsigned int left_depth_size; Modified: code/gazebo/trunk/player/SimulationInterface.cc =================================================================== --- code/gazebo/trunk/player/SimulationInterface.cc 2008-08-10 18:26:25 UTC (rev 6947) +++ code/gazebo/trunk/player/SimulationInterface.cc 2008-08-10 21:12:29 UTC (rev 6948) @@ -51,6 +51,8 @@ GazeboClient::Init(serverId, ""); this->iface = new SimulationIface(); + + this->responseQueue = NULL; } /////////////////////////////////////////////////////////////////////////////// @@ -58,6 +60,12 @@ SimulationInterface::~SimulationInterface() { delete this->iface; + + if (this->responseQueue) + { + delete this->responseQueue; + this->responseQueue = NULL; + } } /////////////////////////////////////////////////////////////////////////////// @@ -205,8 +213,7 @@ this->iface->Unlock(); this->driver->Publish(this->device_addr, respQueue, - PLAYER_MSGTYPE_RESP_ACK, PLAYER_SIMULATION_REQ_GET_PROPERTY, - req, sizeof(*req), NULL); + PLAYER_MSGTYPE_RESP_ACK, PLAYER_SIMULATION_REQ_GET_PROPERTY, req, sizeof(*req), NULL); if (req->value) { Modified: code/gazebo/trunk/server/World.cc =================================================================== --- code/gazebo/trunk/server/World.cc 2008-08-10 18:26:25 UTC (rev 6947) +++ code/gazebo/trunk/server/World.cc 2008-08-10 21:12:29 UTC (rev 6948) @@ -502,7 +502,6 @@ } response = this->simIface->data->responses; - this->simIface->data->responseCount = 0; this->simIface->data->simTime = Simulator::Instance()->GetSimTime(); this->simIface->data->pauseTime = Simulator::Instance()->GetPauseTime(); @@ -583,7 +582,7 @@ response->modelPose.yaw = rot.z; response++; - this->simIface->data->responseCount++; + this->simIface->data->responseCount += 1; } else { Modified: code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc =================================================================== --- code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc 2008-08-10 18:26:25 UTC (rev 6947) +++ code/gazebo/trunk/server/controllers/camera/stereo/Stereo_Camera.cc 2008-08-10 21:12:29 UTC (rev 6948) @@ -151,30 +151,12 @@ stereo_data->hfov = this->myParent->GetHFOV(); stereo_data->vfov = this->myParent->GetVFOV(); - //stereo_data->right_rgb_size = stereo_data->width * stereo_data->height * 3; - //stereo_data->left_rgb_size = stereo_data->width * stereo_data->height * 3; - stereo_data->right_depth_size = stereo_data->width * stereo_data->height * sizeof(float); stereo_data->left_depth_size = stereo_data->width * stereo_data->height * sizeof(float); - // Make sure there is room to store the image - //assert (stereo_data->right_rgb_size <= sizeof(stereo_data->right_rgb)); - //assert (stereo_data->left_rgb_size <= sizeof(stereo_data->left_rgb)); - assert (stereo_data->right_depth_size <= sizeof(stereo_data->right_depth)); assert (stereo_data->left_depth_size <= sizeof(stereo_data->left_depth)); - // Copy the left pixel data to the interface - /*rgb_src = this->myParent->GetImageData(0); - rgb_dst = stereo_data->left_rgb; - memcpy(rgb_dst, rgb_src, stereo_data->left_rgb_size); - - // Copy the right pixel data to the interface - rgb_src = this->myParent->GetImageData(1); - rgb_dst = stereo_data->right_rgb; - memcpy(rgb_dst, rgb_src, stereo_data->right_rgb_size); - */ - // Copy the left depth data to the interface disp_src = this->myParent->GetDepthData(0); disp_dst = stereo_data->left_depth; Modified: code/gazebo/trunk/worlds/simpleshapes.world =================================================================== --- code/gazebo/trunk/worlds/simpleshapes.world 2008-08-10 18:26:25 UTC (rev 6947) +++ code/gazebo/trunk/worlds/simpleshapes.world 2008-08-10 21:12:29 UTC (rev 6948) @@ -36,9 +36,9 @@ </rendering:ogre> <model:physical name="sphere1_model"> - <xyz>1 0 0.25</xyz> + <xyz>1 0 0.5</xyz> <rpy>0.0 0.0 0.0</rpy> - <static>true</static> + <static>false</static> <body:sphere name="sphere1_body"> <geom:sphere name="sphere1_geom"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit