Fawkes API
Fawkes Development Version
manipulator.cpp
1
2
/***************************************************************************
3
* manipulator.cpp - Fawkes to OpenRAVE Manipulator Data
4
*
5
* Created: Thu Sep 16 14:50:34 2010
6
* Copyright 2010 Bahram Maleki-Fard, AllemaniACs RoboCup Team
7
*
8
****************************************************************************/
9
10
/* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* Read the full text in the LICENSE.GPL file in the doc directory.
21
*/
22
23
#include "manipulator.h"
24
25
#include <vector>
26
27
namespace
fawkes
{
28
29
/** @class OpenRaveManipulator <plugins/openrave/manipulator.h>
30
* Class containing information about all manipulator motors.
31
* @author Bahram Maleki-Fard
32
*/
33
34
/** Constructor
35
* @param count number of motors of OpenRAVE model
36
* @param count_device number of motors of real device
37
*/
38
OpenRaveManipulator::OpenRaveManipulator
(
unsigned
int
count,
unsigned
int
count_device)
39
: cnt_(count), cnt_device_(count_device)
40
{
41
}
42
43
/** Destructor. */
44
OpenRaveManipulator::~OpenRaveManipulator
()
45
{
46
}
47
48
/** Adds a motor to the list(vector) of motors
49
* @param number motor number in OpenRAVE
50
* @param number_device motor number of real device
51
*/
52
void
53
OpenRaveManipulator::add_motor
(
unsigned
int
number,
unsigned
int
number_device)
54
{
55
motor_t
motor;
56
motor.
no
= number;
57
motor.
no_device
= number_device;
58
motor.
angle
= 0.f;
59
60
motors_
.push_back(motor);
61
}
62
63
}
// end of namespace fawkes
fawkes::OpenRaveManipulator::motors_
std::vector< motor_t > motors_
vector of motors
Definition:
manipulator.h:84
fawkes::motor_t::no
unsigned int no
motor number in OpenRAVE
Definition:
types.h:71
fawkes
fawkes::motor_t::angle
float angle
radian angle
Definition:
types.h:73
fawkes::motor_t::no_device
unsigned int no_device
motor number of real device
Definition:
types.h:72
fawkes::OpenRaveManipulator::OpenRaveManipulator
OpenRaveManipulator(unsigned int count, unsigned int count_device)
Constructor.
Definition:
manipulator.cpp:44
fawkes::OpenRaveManipulator::add_motor
void add_motor(unsigned int number, unsigned int number_device)
Adds a motor to the list(vector) of motors.
Definition:
manipulator.cpp:59
fawkes::OpenRaveManipulator::~OpenRaveManipulator
virtual ~OpenRaveManipulator()
Destructor.
Definition:
manipulator.cpp:50
fawkes::motor_t
Struct containing angle of current motor, its number in OpenRAVE and corresponding motor number of re...
Definition:
types.h:69
src
plugins
openrave
manipulator.cpp
Generated by
1.8.17