g2o
Loading...
Searching...
No Matches
g2o::Robot< RobotPoseObject > Class Template Reference

#include <simulator.h>

Inheritance diagram for g2o::Robot< RobotPoseObject >:
Collaboration diagram for g2o::Robot< RobotPoseObject >:

Public Types

typedef RobotPoseObject PoseObject
typedef std::list< PoseObject * > TrajectoryType
typedef PoseObject::VertexType VertexType
typedef PoseObject::EstimateType PoseType

Public Member Functions

 Robot (World *world_, const std::string &name_)
virtual void relativeMove (const PoseType &movement_)
virtual void move (const PoseType &pose_)
TrajectoryType & trajectory ()
const PoseType & pose () const
Public Member Functions inherited from g2o::BaseRobot
 BaseRobot (World *world_, const std::string &name_)
void setWorld (World *world_)
World * world () const
const std::string & name () const
OptimizableGraph * graph () const
bool addSensor (BaseSensor *sensor)
const std::set< BaseSensor * > sensors ()
virtual void sense ()

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Protected Attributes

TrajectoryType _trajectory
PoseType _pose
Protected Attributes inherited from g2o::BaseRobot
World * _world
std::set< BaseSensor * > _sensors
std::string _name

Detailed Description

template<class RobotPoseObject>
class g2o::Robot< RobotPoseObject >

Definition at line 127 of file simulator.h.

Member Typedef Documentation

◆ PoseObject

template<class RobotPoseObject>
typedef RobotPoseObject g2o::Robot< RobotPoseObject >::PoseObject

Definition at line 130 of file simulator.h.

◆ PoseType

template<class RobotPoseObject>
typedef PoseObject::EstimateType g2o::Robot< RobotPoseObject >::PoseType

Definition at line 133 of file simulator.h.

◆ TrajectoryType

template<class RobotPoseObject>
typedef std::list<PoseObject*> g2o::Robot< RobotPoseObject >::TrajectoryType

Definition at line 131 of file simulator.h.

◆ VertexType

template<class RobotPoseObject>
typedef PoseObject::VertexType g2o::Robot< RobotPoseObject >::VertexType

Definition at line 132 of file simulator.h.

Constructor & Destructor Documentation

◆ Robot()

template<class RobotPoseObject>
g2o::Robot< RobotPoseObject >::Robot ( World * world_,
const std::string & name_ )
inline

Definition at line 135 of file simulator.h.

BaseRobot(World *world_, const std::string &name_)
Definition simulator.h:85

Member Function Documentation

◆ move()

template<class RobotPoseObject>
virtual void g2o::Robot< RobotPoseObject >::move ( const PoseType & pose_)
inlinevirtual

Definition at line 141 of file simulator.h.

141 {
142 _pose = pose_;
143 if (world()) {
144 PoseObject* po = new PoseObject();
145 po->vertex()->setEstimate(_pose);
147 _trajectory.push_back(po);
148 }
149 }
World * world() const
Definition simulator.h:90
PoseType _pose
Definition simulator.h:156
TrajectoryType _trajectory
Definition simulator.h:155
RobotPoseObject PoseObject
Definition simulator.h:130
bool addWorldObject(BaseWorldObject *worldObject)
Definition simulator.cpp:91

Referenced by main(), Simulator::move(), g2o::Robot< WorldObjectSE2 >::relativeMove(), and Robot::relativeMove().

◆ pose()

template<class RobotPoseObject>
const PoseType & g2o::Robot< RobotPoseObject >::pose ( ) const
inline

Definition at line 152 of file simulator.h.

152{ return _pose; }

Referenced by main().

◆ relativeMove()

template<class RobotPoseObject>
virtual void g2o::Robot< RobotPoseObject >::relativeMove ( const PoseType & movement_)
inlinevirtual

Definition at line 136 of file simulator.h.

136 {
138 move(_pose);
139 }
virtual void move(const PoseType &pose_)
Definition simulator.h:141

Referenced by main(), and Simulator::relativeMove().

◆ trajectory()

Member Data Documentation

◆ _pose

template<class RobotPoseObject>
PoseType g2o::Robot< RobotPoseObject >::_pose
protected

Definition at line 156 of file simulator.h.

◆ _trajectory

template<class RobotPoseObject>
TrajectoryType g2o::Robot< RobotPoseObject >::_trajectory
protected

Definition at line 155 of file simulator.h.

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

template<class RobotPoseObject>
g2o::Robot< RobotPoseObject >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 129 of file simulator.h.


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