g2o
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Simulator Struct Reference
Inheritance diagram for Simulator:
Inheritance graph
[legend]
Collaboration diagram for Simulator:
Collaboration graph
[legend]

Public Member Functions

 Simulator (OptimizableGraph *graph_)
 
void sense (int robotIndex)
 
void move (int robotIndex, const Isometry3d &newRobotPose)
 
void relativeMove (int robotIndex, const Isometry3d &delta)
 
 Simulator (OptimizableGraph *graph_)
 
void sense (int robotIndex)
 
void move (int robotIndex, const Isometry3d &newRobotPose)
 
void relativeMove (int robotIndex, const Isometry3d &delta)
 
- Public Member Functions inherited from SimulatorItem
 SimulatorItem (OptimizableGraph *graph_)
 
OptimizableGraphgraph ()
 
virtual ~SimulatorItem ()
 
 SimulatorItem (OptimizableGraph *graph_)
 
OptimizableGraphgraph ()
 
virtual ~SimulatorItem ()
 

Public Attributes

int _lastVertexId
 
WorldItemSet _world
 
RobotVector _robots
 

Additional Inherited Members

- Protected Attributes inherited from SimulatorItem
OptimizableGraph_graph
 

Detailed Description

Definition at line 148 of file simulator_3d_line.cpp.

Constructor & Destructor Documentation

◆ Simulator() [1/2]

Simulator::Simulator ( OptimizableGraph graph_)
inline

Definition at line 149 of file simulator_3d_line.cpp.

◆ Simulator() [2/2]

Simulator::Simulator ( OptimizableGraph graph_)
inline

Definition at line 173 of file simulator_3d_plane.cpp.

174 : SimulatorItem(graph_), _lastVertexId(0) {}

Member Function Documentation

◆ move() [1/2]

void Simulator::move ( int  robotIndex,
const Isometry3d &  newRobotPose 
)
inline

Definition at line 159 of file simulator_3d_line.cpp.

159 {
160 Robot* r = _robots[robotIndex];
161 r->move(newRobotPose, _lastVertexId);
162 }
virtual void move(const PoseType &pose_)
Definition simulator.h:141
RobotVector _robots

References _lastVertexId, _robots, and g2o::Robot< RobotPoseObject >::move().

Referenced by main().

◆ move() [2/2]

void Simulator::move ( int  robotIndex,
const Isometry3d &  newRobotPose 
)
inline

Definition at line 183 of file simulator_3d_plane.cpp.

183 {
184 Robot* r = _robots[robotIndex];
185 r->move(newRobotPose, _lastVertexId);
186 }

References _lastVertexId, _robots, and g2o::Robot< RobotPoseObject >::move().

◆ relativeMove() [1/2]

void Simulator::relativeMove ( int  robotIndex,
const Isometry3d &  delta 
)
inline

Definition at line 164 of file simulator_3d_line.cpp.

164 {
165 Robot* r = _robots[robotIndex];
166 r->relativeMove(delta, _lastVertexId);
167 }
virtual void relativeMove(const PoseType &movement_)
Definition simulator.h:136

References _lastVertexId, _robots, and g2o::Robot< RobotPoseObject >::relativeMove().

Referenced by main().

◆ relativeMove() [2/2]

void Simulator::relativeMove ( int  robotIndex,
const Isometry3d &  delta 
)
inline

Definition at line 188 of file simulator_3d_plane.cpp.

188 {
189 Robot* r = _robots[robotIndex];
190 r->relativeMove(delta, _lastVertexId);
191 }

References _lastVertexId, _robots, and g2o::Robot< RobotPoseObject >::relativeMove().

◆ sense() [1/2]

void Simulator::sense ( int  robotIndex)
inline

Definition at line 151 of file simulator_3d_line.cpp.

151 {
152 Robot* r = _robots[robotIndex];
153 for (WorldItemSet::iterator it = _world.begin(); it != _world.end(); ++it) {
154 WorldItem* item = *it;
155 r->sense(item);
156 }
157 }
virtual void sense()
Definition simulator.cpp:62
WorldItemSet _world

References _robots, _world, and g2o::BaseRobot::sense().

Referenced by main().

◆ sense() [2/2]

void Simulator::sense ( int  robotIndex)
inline

Definition at line 175 of file simulator_3d_plane.cpp.

175 {
176 Robot* r = _robots[robotIndex];
177 for (WorldItemSet::iterator it = _world.begin(); it != _world.end(); ++it) {
178 WorldItem* item = *it;
179 r->sense(item);
180 }
181 }

References _robots, _world, and g2o::BaseRobot::sense().

Member Data Documentation

◆ _lastVertexId

int Simulator::_lastVertexId

Definition at line 169 of file simulator_3d_line.cpp.

Referenced by main(), move(), and relativeMove().

◆ _robots

RobotVector Simulator::_robots

Definition at line 171 of file simulator_3d_line.cpp.

Referenced by main(), move(), relativeMove(), and sense().

◆ _world

WorldItemSet Simulator::_world

Definition at line 170 of file simulator_3d_line.cpp.

Referenced by main(), and sense().


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