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
27namespace 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 */
38OpenRaveManipulator::OpenRaveManipulator(unsigned int count, unsigned int count_device)
39: cnt_(count), cnt_device_(count_device)
40{
41}
42
43/** Destructor. */
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 */
52void
53OpenRaveManipulator::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
OpenRaveManipulator(unsigned int count, unsigned int count_device)
Constructor.
Definition: manipulator.cpp:38
void add_motor(unsigned int number, unsigned int number_device)
Adds a motor to the list(vector) of motors.
Definition: manipulator.cpp:53
std::vector< motor_t > motors_
vector of motors
Definition: manipulator.h:72
virtual ~OpenRaveManipulator()
Destructor.
Definition: manipulator.cpp:44
Fawkes library namespace.
Struct containing angle of current motor, its number in OpenRAVE and corresponding motor number of re...
Definition: types.h:64
unsigned int no_device
motor number of real device
Definition: types.h:66
float angle
radian angle
Definition: types.h:67
unsigned int no
motor number in OpenRAVE
Definition: types.h:65