g2o
Public Member Functions | Public Attributes | Protected Attributes | List of all members
g2o::SensorSE3Prior Class Reference

#include <sensor_se3_prior.h>

Inheritance diagram for g2o::SensorSE3Prior:
Inheritance graph
[legend]
Collaboration diagram for g2o::SensorSE3Prior:
Collaboration graph
[legend]

Public Member Functions

 SensorSE3Prior (const std::string &name_)
 
virtual void sense ()
 
virtual void addParameters ()
 
ParameterSE3OffsetoffsetParam ()
 
void addNoise (EdgeType *e)
 
- Public Member Functions inherited from g2o::PointSensorParameters
 PointSensorParameters ()
 
double maxRange () const
 
void setMaxRange (double maxRange_)
 
double minRange () const
 
void setMinRange (double minRange_)
 
double fov () const
 
void setFov (double fov_)
 
double maxAngularDifference () const
 
void setMaxAngularDifference (double angularDifference)
 
- Public Member Functions inherited from g2o::UnarySensor< Robot3D, EdgeSE3Prior >
 UnarySensor (const std::string &name)
 
void setInformation (const InformationType &information_)
 
const InformationTypeinformation ()
 
- Public Member Functions inherited from g2o::BaseSensor
 BaseSensor (const std::string &name_)
 
BaseRobotrobot ()
 
void setRobot (BaseRobot *robot_)
 
Worldworld ()
 
OptimizableGraphgraph ()
 
std::vector< Parameter * > parameters ()
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef PoseVertexType::EstimateType RobotPoseType
 
- Public Attributes inherited from g2o::UnarySensor< Robot3D, EdgeSE3Prior >
 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Protected Attributes

RobotPoseType _sensorPose
 
ParameterSE3Offset_offsetParam
 
- Protected Attributes inherited from g2o::PointSensorParameters
double _maxRange2
 
double _minRange2
 
double _fov
 
double _maxAngularDifference
 
- Protected Attributes inherited from g2o::UnarySensor< Robot3D, EdgeSE3Prior >
PoseObject_robotPoseObject
 
InformationType _information
 
GaussianSampler< typename EdgeType::ErrorVector, InformationType_sampler
 
- Protected Attributes inherited from g2o::BaseSensor
std::string _name
 
std::vector< Parameter * > _parameters
 
BaseRobot_robot
 

Additional Inherited Members

- Public Types inherited from g2o::UnarySensor< Robot3D, EdgeSE3Prior >
typedef Robot3D RobotType
 
typedef RobotType::PoseObject PoseObject
 
typedef RobotType::TrajectoryType TrajectoryType
 
typedef RobotType::PoseObject::VertexType PoseVertexType
 
typedef EdgeSE3Prior EdgeType
 
typedef EdgeType::InformationType InformationType
 
- Protected Member Functions inherited from g2o::UnarySensor< Robot3D, EdgeSE3Prior >
EdgeTypemkEdge ()
 

Detailed Description

Definition at line 35 of file sensor_se3_prior.h.

Constructor & Destructor Documentation

g2o::SensorSE3Prior::SensorSE3Prior ( const std::string &  name_)

Definition at line 33 of file sensor_se3_prior.cpp.

References g2o::UnarySensor< Robot3D, EdgeSE3Prior >::_information, _offsetParam, and g2o::UnarySensor< Robot3D, EdgeSE3Prior >::setInformation().

33  : UnarySensor<Robot3D, EdgeSE3Prior>(name_) {
34  _offsetParam = 0;
35  _information.setIdentity();
36  _information*=1000;
37  _information(2,2)=10;
39  }
ParameterSE3Offset * _offsetParam
void setInformation(const InformationType &information_)
Definition: simulator.h:157

Member Function Documentation

void g2o::SensorSE3Prior::addNoise ( EdgeType e)
virtual
void g2o::SensorSE3Prior::addParameters ( )
virtual

Reimplemented from g2o::BaseSensor.

Definition at line 42 of file sensor_se3_prior.cpp.

References _offsetParam, g2o::World::addParameter(), and g2o::BaseSensor::world().

42  {
43  if (!_offsetParam)
44  _offsetParam = new ParameterSE3Offset();
45  assert(world());
47  }
bool addParameter(Parameter *p)
Definition: simulator.cpp:102
ParameterSE3Offset * _offsetParam
World * world()
Definition: simulator.cpp:69
ParameterSE3Offset* g2o::SensorSE3Prior::offsetParam ( )
inline

Definition at line 42 of file sensor_se3_prior.h.

Referenced by main().

42 {return _offsetParam;};
ParameterSE3Offset * _offsetParam
void g2o::SensorSE3Prior::sense ( )
virtual

Reimplemented from g2o::UnarySensor< Robot3D, EdgeSE3Prior >.

Definition at line 56 of file sensor_se3_prior.cpp.

References _offsetParam, g2o::UnarySensor< Robot3D, EdgeSE3Prior >::_robotPoseObject, _sensorPose, g2o::OptimizableGraph::addEdge(), addNoise(), g2o::BaseSensor::graph(), g2o::Parameter::id(), g2o::UnarySensor< Robot3D, EdgeSE3Prior >::mkEdge(), g2o::ParameterSE3Offset::offset(), g2o::BaseSensor::robot(), g2o::EdgeSE3Prior::setMeasurementFromState(), g2o::OptimizableGraph::Edge::setParameterId(), and g2o::Robot< RobotPoseObject >::trajectory().

56  {
57  if (! _offsetParam){
58  return;
59  }
61  RobotType* r= dynamic_cast<RobotType*>(robot());
62  std::list<PoseObject*>::reverse_iterator it=r->trajectory().rbegin();
63  int count = 0;
64  while (it!=r->trajectory().rend() && count < 1){
65  if (!_robotPoseObject)
66  _robotPoseObject = *it;
67  it++;
68  count++;
69  }
70  if (!_robotPoseObject)
71  return;
72  _sensorPose = _robotPoseObject->vertex()->estimate()*_offsetParam->offset();
73  EdgeType* e=mkEdge();
74  e->setParameterId(0,_offsetParam->id());
75  if (e && graph()) {
76  graph()->addEdge(e);
77  e->setMeasurementFromState();
78  addNoise(e);
79  }
80  }
void addNoise(EdgeType *e)
const Isometry3D & offset() const
rotation of the offset as 3x3 rotation matrix
ParameterSE3Offset * _offsetParam
RobotPoseType _sensorPose
TrajectoryType & trajectory()
Definition: simulator.h:119
int id() const
Definition: parameter.h:45
OptimizableGraph * graph()
Definition: simulator.cpp:75
BaseRobot * robot()
Definition: simulator.h:129
virtual bool addEdge(HyperGraph::Edge *e)

Member Data Documentation

ParameterSE3Offset* g2o::SensorSE3Prior::_offsetParam
protected

Definition at line 46 of file sensor_se3_prior.h.

Referenced by addParameters(), sense(), and SensorSE3Prior().

RobotPoseType g2o::SensorSE3Prior::_sensorPose
protected

Definition at line 45 of file sensor_se3_prior.h.

Referenced by sense().

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef PoseVertexType::EstimateType g2o::SensorSE3Prior::RobotPoseType

Definition at line 38 of file sensor_se3_prior.h.


The documentation for this class was generated from the following files: