Robotics Library  0.7.0
Gnuplot.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_GNUPLOT_H
28 #define RL_HAL_GNUPLOT_H
29 
30 #include <list>
31 
32 #include "CyclicDevice.h"
33 #include "JointPositionActuator.h"
34 
35 namespace rl
36 {
37  namespace hal
38  {
40  {
41  public:
42  Gnuplot(
43  const ::std::size_t& dof,
44  const ::std::chrono::nanoseconds& updateRate,
47  const ::std::size_t& max = 200
48  );
49 
50  virtual ~Gnuplot();
51 
52  void close();
53 
54  void open();
55 
57 
59 
60  void start();
61 
62  void step();
63 
64  void stop();
65 
66  protected:
67 
68  private:
69  FILE* fp;
70 
71  ::std::list< ::rl::math::Vector> history;
72 
73  ::std::size_t max;
74 
76 
78  };
79  }
80 }
81 
82 #endif // RL_HAL_GNUPLOT_H
rl::hal::Gnuplot::close
void close()
Definition: Gnuplot.cpp:74
rl::hal::Gnuplot::ymax
::rl::math::Real ymax
Definition: Gnuplot.h:75
rl::hal::Gnuplot::stop
void stop()
Definition: Gnuplot.cpp:175
rl::hal::Gnuplot::fp
FILE * fp
Definition: Gnuplot.h:69
rl::math::Vector
::Eigen::Matrix< Real, ::Eigen::Dynamic, 1 > Vector
Definition: Vector.h:42
rl::hal::Gnuplot::history
::std::list< ::rl::math::Vector > history
Definition: Gnuplot.h:71
rl::hal::CyclicDevice
Definition: CyclicDevice.h:39
rl::hal::Gnuplot::ymin
::rl::math::Real ymin
Definition: Gnuplot.h:77
rl::hal::AxisController::dof
::std::size_t dof
Degrees of freedom.
Definition: AxisController.h:52
rl::hal::Gnuplot::setJointPosition
void setJointPosition(const ::rl::math::Vector &q)
Definition: Gnuplot.cpp:106
rl::hal::Gnuplot::open
void open()
Definition: Gnuplot.cpp:85
rl::hal::Gnuplot::start
void start()
Definition: Gnuplot.cpp:128
rl::hal::Gnuplot
Definition: Gnuplot.h:40
rl::hal::Gnuplot::~Gnuplot
virtual ~Gnuplot()
Definition: Gnuplot.cpp:69
rl::hal::Gnuplot::step
void step()
Definition: Gnuplot.cpp:135
rl::hal::Gnuplot::max
::std::size_t max
Definition: Gnuplot.h:73
rl::hal::Gnuplot::setRange
void setRange(const ::rl::math::Real &ymin, const ::rl::math::Real &ymax)
Definition: Gnuplot.cpp:119
JointPositionActuator.h
rl::hal::Gnuplot::Gnuplot
Gnuplot(const ::std::size_t &dof, const ::std::chrono::nanoseconds &updateRate, const ::rl::math::Real &ymin, const ::rl::math::Real &ymax, const ::std::size_t &max=200)
Definition: Gnuplot.cpp:51
CyclicDevice.h
rl::hal::CyclicDevice::updateRate
::std::chrono::nanoseconds updateRate
Definition: CyclicDevice.h:55
rl::hal::JointPositionActuator
Definition: JointPositionActuator.h:39
rl::math::Real
double Real
Definition: Real.h:42
rl
Robotics Library.
Definition: AnalogInput.cpp:30