Robotics Library  0.6.2
Coach.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2009, Markus Rickert
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // * Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 // POSSIBILITY OF SUCH DAMAGE.
25 //
26 
27 #ifndef _RL_HAL_COACH_H_
28 #define _RL_HAL_COACH_H_
29 
30 #include <sstream>
31 #include <string>
32 
33 #include "JointPositionActuator.h"
34 
35 namespace rl
36 {
37  namespace hal
38  {
39  class TcpSocket;
40 
42  {
43  public:
44  Coach(
45  const ::std::size_t& dof,
47  const ::std::size_t& i = 0,
48  const ::std::string& host = "localhost",
49  const unsigned short int& port = 11235
50  );
51 
52  virtual ~Coach();
53 
54  void close();
55 
56  void open();
57 
59 
60  void start();
61 
62  void step();
63 
64  void stop();
65 
66  protected:
67 
68  private:
69  ::std::size_t i;
70 
72 
73  ::std::stringstream text;
74  };
75  }
76 }
77 
78 #endif // _RL_HAL_COACH_H_
rl::hal::AxisController::updateRate
::rl::math::Real updateRate
[s]
Definition: AxisController.h:56
rl::hal::Coach::text
::std::stringstream text
Definition: Coach.h:73
rl::hal::Coach::step
void step()
Definition: Coach.cpp:98
rl::hal::Coach::open
void open()
Definition: Coach.cpp:66
rl::hal::Coach::close
void close()
Definition: Coach.cpp:59
rl::hal::Coach::Coach
Coach(const ::std::size_t &dof, const ::rl::math::Real &updateRate, const ::std::size_t &i=0, const ::std::string &host="localhost", const unsigned short int &port=11235)
Definition: Coach.cpp:38
rl::hal::Coach
Definition: Coach.h:42
rl::hal::Coach::stop
void stop()
Definition: Coach.cpp:106
rl::hal::AxisController::dof
::std::size_t dof
Degrees of freedom.
Definition: AxisController.h:53
rl::hal::set
void set(const uint8_t &value, uint8_t *&ptr, ::std::size_t &len)
Definition: LeuzeRs4.cpp:62
rl::hal::Coach::setJointPosition
void setJointPosition(const ::rl::math::Vector &set)
Definition: Coach.cpp:73
rl::hal::TcpSocket
Definition: TcpSocket.h:37
rl::hal::Coach::i
::std::size_t i
Definition: Coach.h:69
rl::hal::Coach::tcp
TcpSocket * tcp
Definition: Coach.h:71
JointPositionActuator.h
rl::hal::Coach::~Coach
virtual ~Coach()
Definition: Coach.cpp:53
rl::math::Vector
::Eigen::Matrix< Real, ::Eigen::Dynamic, 1 > Vector
Definition: Vector.h:41
rl::hal::Coach::start
void start()
Definition: Coach.cpp:93
rl::hal::JointPositionActuator
Definition: JointPositionActuator.h:39
rl::math::Real
double Real
Definition: Real.h:34
rl
Definition: Ati.cpp:35