Skip to content

Commit

Permalink
YarpOpenraveGrabber implement getCameraDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores committed Feb 12, 2020
1 parent c68d11d commit 72dab2a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ bool YarpOpenraveGrabber::open(yarp::os::Searchable& config)

sensorBasePtr = vectorOfSensorPtr.at(sensorIndex)->GetSensor();

std::string tipo = sensorBasePtr->GetName();
std::string sensorName = sensorBasePtr->GetName();

printf("Sensor %d name: %s\n",sensorIndex,tipo.c_str());
printf("Sensor %d name: %s\n",sensorIndex,sensorName.c_str());
cameraDescriptor.deviceDescription = sensorName;
cameraDescriptor.busType = BUS_UNKNOWN;

// printf("Sensor %d description: %s\n",sensorIter,psensorbase->GetDescription().c_str());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace roboticslab

bool YarpOpenraveGrabber::getCameraDescription(CameraDescriptor *camera)
{
return false;
*camera = cameraDescriptor;
return true;
}

// ----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,17 @@ class YarpOpenraveGrabber : YarpOpenraveBase,

private:

// General Grabber parameters //
// General Grabber parameters
int _height, _width;

//OpenRAVE//
// OpenRAVE
OpenRAVE::SensorBasePtr sensorBasePtr;
boost::shared_ptr<OpenRAVE::SensorBase::CameraSensorData> sensorDataPtr;
boost::shared_ptr<OpenRAVE::SensorBase::CameraGeomData> modGeomDataPtr;

// YARP
CameraDescriptor cameraDescriptor;

static const int NOT_SET;
};

Expand Down

0 comments on commit 72dab2a

Please sign in to comment.