ARGoS
3
A parallel, multi-engine simulator for swarm robotics
quadrotor_entity.cpp
Go to the documentation of this file.
1
6
7
#include "
quadrotor_entity.h
"
8
#include <argos3/core/simulator/space/space.h>
9
10
namespace
argos
{
11
12
/****************************************/
13
/****************************************/
14
15
CQuadRotorEntity::SPositionControlData::SPositionControlData
(
16
const
CVector3
& c_position,
17
const
CRadians
& c_yaw) :
18
Position
(c_position),
19
Yaw
(c_yaw) {}
20
21
/****************************************/
22
/****************************************/
23
24
CQuadRotorEntity::SSpeedControlData::SSpeedControlData
(
25
const
CVector3
& c_velocity,
26
const
CRadians
& c_rot_speed) :
27
Velocity
(c_velocity),
28
RotSpeed
(c_rot_speed) {}
29
30
/****************************************/
31
/****************************************/
32
33
CQuadRotorEntity::CQuadRotorEntity
(
CComposableEntity
* pc_parent) :
34
CEntity
(pc_parent),
35
m_eControlMethod(
NO_CONTROL
) {
36
Reset
();
37
}
38
39
/****************************************/
40
/****************************************/
41
42
CQuadRotorEntity::CQuadRotorEntity
(
CComposableEntity
* pc_parent,
43
const
std::string& str_id) :
44
CEntity
(pc_parent, str_id),
45
m_eControlMethod(
NO_CONTROL
) {
46
Reset
();
47
}
48
49
/****************************************/
50
/****************************************/
51
52
void
CQuadRotorEntity::Reset
() {
53
m_sPositionControlData.Position.Set(0.0f, 0.0f, 0.0f);
54
m_sPositionControlData.Yaw.SetValue(0.0f);
55
m_sSpeedControlData.Velocity.Set(0.0f, 0.0f, 0.0f);
56
m_sSpeedControlData.RotSpeed.SetValue(0.0);
57
}
58
59
/****************************************/
60
/****************************************/
61
62
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY
(
CQuadRotorEntity
);
63
64
/****************************************/
65
/****************************************/
66
67
}
quadrotor_entity.h
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY
#define REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(ENTITY)
Definition
space.h:564
argos
The namespace containing all the ARGoS related code.
Definition
ci_actuator.h:12
argos::CComposableEntity
Basic class for an entity that contains other entities.
Definition
composable_entity.h:32
argos::CEntity::CEntity
CEntity(CComposableEntity *pc_parent)
Class constructor.
Definition
entity.cpp:18
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition
angles.h:42
argos::CVector3
A 3D vector class.
Definition
vector3.h:31
argos::CQuadRotorEntity
Definition
quadrotor_entity.h:15
argos::CQuadRotorEntity::NO_CONTROL
@ NO_CONTROL
Definition
quadrotor_entity.h:24
argos::CQuadRotorEntity::CQuadRotorEntity
CQuadRotorEntity(CComposableEntity *pc_parent)
Definition
quadrotor_entity.cpp:33
argos::CQuadRotorEntity::Reset
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
Definition
quadrotor_entity.cpp:52
argos::CQuadRotorEntity::SPositionControlData::Position
CVector3 Position
Definition
quadrotor_entity.h:30
argos::CQuadRotorEntity::SPositionControlData::SPositionControlData
SPositionControlData()
Definition
quadrotor_entity.h:33
argos::CQuadRotorEntity::SPositionControlData::Yaw
CRadians Yaw
Definition
quadrotor_entity.h:31
argos::CQuadRotorEntity::SSpeedControlData::SSpeedControlData
SSpeedControlData()
Definition
quadrotor_entity.h:42
argos::CQuadRotorEntity::SSpeedControlData::RotSpeed
CRadians RotSpeed
Definition
quadrotor_entity.h:40
argos::CQuadRotorEntity::SSpeedControlData::Velocity
CVector3 Velocity
Definition
quadrotor_entity.h:39
plugins
simulator
entities
quadrotor_entity.cpp
Generated on Tue Mar 4 2025 00:50:33 for ARGoS by
1.13.2