Robotics Library  0.6.2
Jr3.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_JR3_H_
28 #define _RL_HAL_JR3_H_
29 
30 #include <string>
31 
33 
34 namespace rl
35 {
36  namespace hal
37  {
38  class Comedi;
39 
41  {
42  public:
43  Jr3(const ::std::string& filename = "/dev/comedi0");
44 
45  virtual ~Jr3();
46 
47  void bias();
48 
49  void close();
50 
51  void getForces(::rl::math::Vector& forces) const;
52 
53  ::rl::math::Real getForcesMaximum(const ::std::size_t& i) const;
54 
55  ::rl::math::Real getForcesMinimum(const ::std::size_t& i) const;
56 
57  void getForcesTorques(::rl::math::Vector& forcesTorques) const;
58 
59  ::rl::math::Real getForcesTorquesMaximum(const ::std::size_t& i) const;
60 
61  ::rl::math::Real getForcesTorquesMinimum(const ::std::size_t& i) const;
62 
63  void getTorques(::rl::math::Vector& torques) const;
64 
65  ::rl::math::Real getTorquesMaximum(const ::std::size_t& i) const;
66 
67  ::rl::math::Real getTorquesMinimum(const ::std::size_t& i) const;
68 
69  void open();
70 
71  void resetBias();
72 
73  void start();
74 
75  void step();
76 
77  void stop();
78 
79  protected:
80 
81  private:
83 
84  float values[6];
85 
86  float zeroes[6];
87  };
88  }
89 }
90 
91 #endif // _RL_HAL_JR3_H_
rl::hal::SixAxisForceTorqueSensor
Definition: SixAxisForceTorqueSensor.h:40
SixAxisForceTorqueSensor.h
rl::hal::Jr3::getForces
void getForces(::rl::math::Vector &forces) const
Definition: Jr3.cpp:73
rl::hal::Jr3::~Jr3
virtual ~Jr3()
Definition: Jr3.cpp:51
rl::hal::Jr3::resetBias
void resetBias()
Definition: Jr3.cpp:161
rl::hal::Jr3::getTorquesMaximum
::rl::math::Real getTorquesMaximum(const ::std::size_t &i) const
Definition: Jr3.cpp:138
rl::hal::Jr3
Definition: Jr3.h:41
rl::hal::Jr3::step
void step()
Definition: Jr3.cpp:175
rl::hal::Jr3::getForcesMinimum
::rl::math::Real getForcesMinimum(const ::std::size_t &i) const
Definition: Jr3.cpp:92
rl::hal::Jr3::Jr3
Jr3(const ::std::string &filename="/dev/comedi0")
Definition: Jr3.cpp:38
rl::hal::Jr3::close
void close()
Definition: Jr3.cpp:66
rl::hal::Jr3::open
void open()
Definition: Jr3.cpp:154
rl::hal::Jr3::getForcesTorquesMaximum
::rl::math::Real getForcesTorquesMaximum(const ::std::size_t &i) const
Definition: Jr3.cpp:111
rl::hal::Jr3::zeroes
float zeroes[6]
Definition: Jr3.h:86
rl::hal::Comedi
Definition: Comedi.h:40
rl::hal::Jr3::getForcesTorques
void getForcesTorques(::rl::math::Vector &forcesTorques) const
Definition: Jr3.cpp:100
rl::hal::Jr3::getTorques
void getTorques(::rl::math::Vector &torques) const
Definition: Jr3.cpp:127
rl::hal::Jr3::bias
void bias()
Definition: Jr3.cpp:57
rl::hal::Jr3::getForcesTorquesMinimum
::rl::math::Real getForcesTorquesMinimum(const ::std::size_t &i) const
Definition: Jr3.cpp:119
rl::hal::Jr3::values
float values[6]
Definition: Jr3.h:84
rl::hal::Jr3::getForcesMaximum
::rl::math::Real getForcesMaximum(const ::std::size_t &i) const
Definition: Jr3.cpp:84
rl::math::Vector
::Eigen::Matrix< Real, ::Eigen::Dynamic, 1 > Vector
Definition: Vector.h:41
rl::hal::Jr3::getTorquesMinimum
::rl::math::Real getTorquesMinimum(const ::std::size_t &i) const
Definition: Jr3.cpp:146
rl::hal::Jr3::stop
void stop()
Definition: Jr3.cpp:184
rl::math::Real
double Real
Definition: Real.h:34
rl::hal::Jr3::comedi
Comedi * comedi
Definition: Jr3.h:82
rl::hal::Jr3::start
void start()
Definition: Jr3.cpp:170
rl
Definition: Ati.cpp:35