ARGoS 3
A parallel, multi-engine simulator for swarm robotics
wheeled_entity.h
Go to the documentation of this file.
1
7#ifndef WHEELED_ENTITY_H
8#define WHEELED_ENTITY_H
9
10#include <argos3/core/simulator/entity/entity.h>
11#include <argos3/core/utility/math/vector3.h>
12
13namespace argos {
14
15 class CWheeledEntity : public CEntity {
16
17 public:
18
20
21 public:
22
24 size_t un_num_wheels);
25
27 const std::string& str_id,
28 size_t un_num_wheels);
29
30 virtual ~CWheeledEntity();
31
32 virtual void Reset();
33
34 inline size_t GetNumWheels() const {
35 return m_unNumWheels;
36 }
37
38 void SetWheel(UInt32 un_index,
39 const CVector3& c_position,
40 Real f_radius);
41
42 const CVector3& GetWheelPosition(size_t un_index) const;
43
44 inline const CVector3* GetWheelPositions() const {
45 return m_pcWheelPositions;
46 }
47
48 Real GetWheelRadius(size_t un_index) const;
49
50 inline const Real* GetWheelRadia() const {
51 return m_pfWheelRadia;
52 }
53
54 Real GetWheelVelocity(size_t un_index) const;
55
56 inline const Real* GetWheelVelocities() const {
57 return m_pfWheelVelocities;
58 }
59
60 void SetVelocities(Real* pf_velocities);
61
62 virtual std::string GetTypeDescription() const {
63 return "wheels";
64 }
65
66 private:
67
68 size_t m_unNumWheels;
69 CVector3* m_pcWheelPositions;
70 Real* m_pfWheelRadia;
71 Real* m_pfWheelVelocities;
72
73 };
74
75}
76
77#endif
unsigned int UInt32
32-bit unsigned integer.
Definition datatypes.h:97
float Real
Collects all ARGoS code.
Definition datatypes.h:39
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
Basic class for an entity that contains other entities.
The basic entity type.
Definition entity.h:90
A 3D vector class.
Definition vector3.h:31
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
Real GetWheelRadius(size_t un_index) const
const CVector3 * GetWheelPositions() const
CWheeledEntity(CComposableEntity *pc_parent, size_t un_num_wheels)
const CVector3 & GetWheelPosition(size_t un_index) const
void SetWheel(UInt32 un_index, const CVector3 &c_position, Real f_radius)
virtual std::string GetTypeDescription() const
Returns a string label for this class.
void SetVelocities(Real *pf_velocities)
const Real * GetWheelVelocities() const
const Real * GetWheelRadia() const
size_t GetNumWheels() const
Real GetWheelVelocity(size_t un_index) const