Fawkes API Fawkes Development Version
arm_kindrv.h
1
2/***************************************************************************
3 * arm_kindrv.h - Class for a Kinova Jaco arm, using libkindrv
4 *
5 * Created: Tue Jul 29 14:58:32 2014
6 * Copyright 2014 Bahram Maleki-Fard
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#ifndef _PLUGINS_JACO_ARM_KINDRV_H_
24#define _PLUGINS_JACO_ARM_KINDRV_H_
25
26#include "arm.h"
27#include "types.h"
28
29#include <memory>
30
31namespace KinDrv {
32class JacoArm;
33}
34
35namespace fawkes {
36
37//class RefPtr;
38
39class JacoArmKindrv : public JacoArm
40{
41public:
42 JacoArmKindrv(const char *name = NULL);
43 virtual ~JacoArmKindrv();
44
45 virtual void initialize();
46
47 virtual bool final();
48 virtual bool initialized();
49
50 virtual void get_joints(std::vector<float> &to) const;
51 virtual void get_coords(std::vector<float> &to);
52 virtual void get_fingers(std::vector<float> &to) const;
53
54 virtual void stop();
55 virtual void push_joystick(unsigned int button);
56 virtual void release_joystick();
57
58 virtual void goto_trajec(std::vector<std::vector<float>> *trajec, std::vector<float> &fingers);
59 virtual void
60 goto_joints(std::vector<float> &joints, std::vector<float> &fingers, bool followup = false);
61 virtual void goto_coords(std::vector<float> &coords, std::vector<float> &fingers);
62 virtual void goto_ready();
63 virtual void goto_retract();
64
65private:
66 std::unique_ptr<KinDrv::JacoArm> arm_;
67
68 fawkes::jaco_target_type_t target_type_;
69 bool final_;
70
71 bool ctrl_ang_;
72};
73
74} // end of namespace fawkes
75
76#endif
Class for commanding a Kinova Jaco Arm, using libkindrv.
Definition: arm_kindrv.h:40
virtual void get_fingers(std::vector< float > &to) const
Get the position values of the fingers.
Definition: arm_kindrv.cpp:185
virtual void goto_trajec(std::vector< std::vector< float > > *trajec, std::vector< float > &fingers)
Move the arm along the given trajectory.
Definition: arm_kindrv.cpp:219
virtual void release_joystick()
Simulate releasing the joystick of the Kinova Jaco arm.
Definition: arm_kindrv.cpp:211
virtual void goto_ready()
Move the arm to READY position.
Definition: arm_kindrv.cpp:285
virtual void stop()
Stop the current movement.
Definition: arm_kindrv.cpp:196
JacoArmKindrv(const char *name=NULL)
Constructor.
Definition: arm_kindrv.cpp:43
virtual ~JacoArmKindrv()
Destructor.
Definition: arm_kindrv.cpp:85
virtual void initialize()
Initialize the arm.
Definition: arm_kindrv.cpp:90
virtual void push_joystick(unsigned int button)
Simulate a push of a button on the joystick of the Kinova Jaco arm.
Definition: arm_kindrv.cpp:203
virtual void goto_retract()
Move the arm to RETRACT position.
Definition: arm_kindrv.cpp:322
virtual bool initialized()
Check if arm is initialized.
Definition: arm_kindrv.cpp:141
virtual void goto_coords(std::vector< float > &coords, std::vector< float > &fingers)
Move the arm to given configuration.
Definition: arm_kindrv.cpp:263
virtual void get_coords(std::vector< float > &to)
Get the cartesian coordinates of the arm.
Definition: arm_kindrv.cpp:152
virtual void get_joints(std::vector< float > &to) const
Get the joint angles of the arm.
Definition: arm_kindrv.cpp:171
virtual void goto_joints(std::vector< float > &joints, std::vector< float > &fingers, bool followup=false)
Move the arm to given configuration.
Definition: arm_kindrv.cpp:239
Abstract class for a Kinova Jaco Arm that we want to control.
Definition: arm.h:36
Fawkes library namespace.
enum fawkes::jaco_target_type_enum jaco_target_type_t
The type of a target.