Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
b
c
d
e
f
i
m
n
o
p
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
b
c
f
i
m
o
s
t
v
w
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
a
c
d
e
f
g
i
n
o
p
r
s
u
v
~
Variables
a
b
c
d
e
f
h
i
m
n
p
r
s
t
v
w
x
y
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
a
b
c
g
m
s
t
Functions
m
t
Macros
src
types.cpp
Go to the documentation of this file.
1
#include "
create/types.h
"
2
3
namespace
create
{
4
5
RobotModel::RobotModel
(
const
ProtocolVersion
version,
const
float
axleLength,
const
unsigned
int
baud,
const
float
maxVelocity,
const
float
wheelDiameter):
6
id(nextId),
7
version(version),
8
axleLength(axleLength),
9
baud(baud),
10
maxVelocity(maxVelocity),
11
wheelDiameter(wheelDiameter) {
12
nextId
<<= 1;
13
}
14
15
bool
RobotModel::operator ==
(
RobotModel
& other)
const
{
16
return
id
== other.
id
;
17
}
18
19
RobotModel::operator uint32_t()
const
{
20
return
id;
21
}
22
23
uint32_t
RobotModel::getId
()
const
{
24
return
id
;
25
}
26
27
ProtocolVersion
RobotModel::getVersion
()
const
{
28
return
version
;
29
}
30
31
float
RobotModel::getAxleLength
()
const
{
32
return
axleLength
;
33
}
34
35
unsigned
int
RobotModel::getBaud
()
const
{
36
return
baud
;
37
}
38
39
float
RobotModel::getMaxVelocity
()
const
{
40
return
maxVelocity
;
41
}
42
43
float
RobotModel::getWheelDiameter
()
const
{
44
return
wheelDiameter
;
45
}
46
47
uint32_t
RobotModel::nextId
= 1;
48
49
RobotModel
RobotModel::ROOMBA_400
(
V_1
, 0.258, 57600);
50
RobotModel
RobotModel::CREATE_1
(
V_2
, 0.258, 57600);
51
RobotModel
RobotModel::CREATE_2
(
V_3
, 0.235, 115200, 0.5, 0.072);
52
}
types.h
create::V_3
@ V_3
Definition:
types.h:44
create::RobotModel::CREATE_2
static RobotModel CREATE_2
Compatible with Create 2 or Roomba 600 series and greater.
Definition:
types.h:73
create::RobotModel::RobotModel
RobotModel(const ProtocolVersion version, const float axleLength, const unsigned int baud, const float maxVelocity=0.5, const float wheelDiameter=0.078)
Definition:
types.cpp:5
create::RobotModel::getWheelDiameter
float getWheelDiameter() const
Definition:
types.cpp:43
create::RobotModel::getMaxVelocity
float getMaxVelocity() const
Definition:
types.cpp:39
create::RobotModel::maxVelocity
float maxVelocity
Definition:
types.h:80
create::RobotModel::id
uint32_t id
Definition:
types.h:76
create::RobotModel::version
ProtocolVersion version
Definition:
types.h:77
create::RobotModel::CREATE_1
static RobotModel CREATE_1
Compatible with Create 1 or Roomba 500 series.
Definition:
types.h:68
create::RobotModel::getVersion
ProtocolVersion getVersion() const
Definition:
types.cpp:27
create::RobotModel::axleLength
float axleLength
Definition:
types.h:78
create::V_1
@ V_1
Definition:
types.h:42
create::V_2
@ V_2
Definition:
types.h:43
create::RobotModel::nextId
static uint32_t nextId
Definition:
types.h:84
create::RobotModel::getId
uint32_t getId() const
Definition:
types.cpp:23
create::RobotModel::ROOMBA_400
static RobotModel ROOMBA_400
Compatible with Roomba 400 series and earlier.
Definition:
types.h:63
create::RobotModel::getAxleLength
float getAxleLength() const
Definition:
types.cpp:31
create::RobotModel::baud
unsigned int baud
Definition:
types.h:79
create::RobotModel::getBaud
unsigned int getBaud() const
Definition:
types.cpp:35
create
Definition:
create.h:48
create::RobotModel::wheelDiameter
float wheelDiameter
Definition:
types.h:81
create::ProtocolVersion
ProtocolVersion
Definition:
types.h:41
create::RobotModel
Definition:
types.h:48
create::RobotModel::operator==
bool operator==(RobotModel &other) const
Definition:
types.cpp:15
libcreate
Author(s): Jacob Perron
autogenerated on Wed May 24 2023 02:24:57