Fawkes API  Fawkes Development Version
fawkes::JacoArmDummy Class Reference

Class for simulating a dummy Kinova Jaco Arm. More...

#include <>>

Inheritance diagram for fawkes::JacoArmDummy:

Public Member Functions

 JacoArmDummy (const char *name)
 Constructor. More...
 
virtual ~JacoArmDummy ()
 Destructor. More...
 
virtual void initialize ()
 Initialize the arm. More...
 
virtual bool final ()
 Check if movement is final. More...
 
virtual bool initialized ()
 Check if arm is initialized. More...
 
virtual void get_joints (std::vector< float > &to) const
 Get the joint angles of the arm. More...
 
virtual void get_coords (std::vector< float > &to)
 Get the cartesian coordinates of the arm. More...
 
virtual void get_fingers (std::vector< float > &to) const
 Get the position values of the fingers. More...
 
virtual void stop ()
 Stop the current movement. More...
 
virtual void push_joystick (unsigned int button)
 Simulate a push of a button on the joystick of the Kinova Jaco arm. More...
 
virtual void release_joystick ()
 Simulate releasing the joystick of the Kinova Jaco arm. More...
 
virtual void goto_trajec (std::vector< std::vector< float > > *trajec, std::vector< float > &fingers)
 Move the arm along the given trajectory. More...
 
virtual void goto_joints (std::vector< float > &joints, std::vector< float > &fingers, bool followup=false)
 Move the arm to given configuration. More...
 
virtual void goto_coords (std::vector< float > &coords, std::vector< float > &fingers)
 Move the arm to given configuration. More...
 
virtual void goto_ready ()
 Move the arm to READY position. More...
 
virtual void goto_retract ()
 Move the arm to RETRACT position. More...
 
- Public Member Functions inherited from fawkes::JacoArm
virtual ~JacoArm ()
 Virtual empty destructor. More...
 
std::string get_name () const
 Get the name of the arm. More...
 

Additional Inherited Members

- Protected Attributes inherited from fawkes::JacoArm
std::string __name
 the name of this arm More...
 
bool __initialized
 track if the arm has been initialized or not More...
 

Detailed Description

Class for simulating a dummy Kinova Jaco Arm.

Each command is accepted, simply storing its values and returning them when a getter is called. This class does not operate any actual arm (whether a real one nor even a simulated 3D model).

Author
Bahram Maleki-Fard

Definition at line 37 of file arm_dummy.h.

Constructor & Destructor Documentation

◆ JacoArmDummy()

fawkes::JacoArmDummy::JacoArmDummy ( const char *  name)

Constructor.

Parameters
nameThe name of the arm we want to connect to

Definition at line 58 of file arm_dummy.cpp.

References fawkes::JacoArm::__initialized, and fawkes::JacoArm::__name.

◆ ~JacoArmDummy()

fawkes::JacoArmDummy::~JacoArmDummy ( )
virtual

Destructor.

Definition at line 84 of file arm_dummy.cpp.

Member Function Documentation

◆ final()

bool fawkes::JacoArmDummy::final ( )
virtual

Check if movement is final.

Returns
is movement final?

Implements fawkes::JacoArm.

Definition at line 96 of file arm_dummy.cpp.

◆ get_coords()

void fawkes::JacoArmDummy::get_coords ( std::vector< float > &  to)
virtual

Get the cartesian coordinates of the arm.

Parameters
tovector to be filled with coordinates.

Implements fawkes::JacoArm.

Definition at line 109 of file arm_dummy.cpp.

◆ get_fingers()

void fawkes::JacoArmDummy::get_fingers ( std::vector< float > &  to) const
virtual

Get the position values of the fingers.

Parameters
tovector to be filled with finger positions.

Implements fawkes::JacoArm.

Definition at line 121 of file arm_dummy.cpp.

◆ get_joints()

void fawkes::JacoArmDummy::get_joints ( std::vector< float > &  to) const
virtual

Get the joint angles of the arm.

Parameters
tovector to be filled with angle values for active joints.

Implements fawkes::JacoArm.

Definition at line 115 of file arm_dummy.cpp.

◆ goto_coords()

void fawkes::JacoArmDummy::goto_coords ( std::vector< float > &  coords,
std::vector< float > &  fingers 
)
virtual

Move the arm to given configuration.

No real movement for "dummy" arm though, it just sets these values to the current ones.

Parameters
coordstarget fingertip coordinations
fingerstarget finger positions

Implements fawkes::JacoArm.

Definition at line 186 of file arm_dummy.cpp.

◆ goto_joints()

void fawkes::JacoArmDummy::goto_joints ( std::vector< float > &  joints,
std::vector< float > &  fingers,
bool  followup = false 
)
virtual

Move the arm to given configuration.

No real movement for "dummy" arm though, it just sets these values to the current ones.

Parameters
jointstarget joint angles
fingerstarget finger positions
followupdefines if this is a singular trajectory-point, or a consecutive one. Setting to "false" acuires control of the arm and sets the mode to "angular" each time. Because of that, it needs to be "true" if it is a "followup" trajectory point.

Implements fawkes::JacoArm.

Definition at line 169 of file arm_dummy.cpp.

Referenced by goto_ready(), goto_retract(), and goto_trajec().

◆ goto_ready()

void fawkes::JacoArmDummy::goto_ready ( )
virtual

Move the arm to READY position.

Implements fawkes::JacoArm.

Definition at line 193 of file arm_dummy.cpp.

References goto_joints().

Referenced by initialize().

◆ goto_retract()

void fawkes::JacoArmDummy::goto_retract ( )
virtual

Move the arm to RETRACT position.

Implements fawkes::JacoArm.

Definition at line 199 of file arm_dummy.cpp.

References goto_joints().

◆ goto_trajec()

void fawkes::JacoArmDummy::goto_trajec ( std::vector< std::vector< float > > *  trajec,
std::vector< float > &  fingers 
)
virtual

Move the arm along the given trajectory.

Calls goto_joints() 33Hz (default Fawkes loop time)

See also
goto_joints
Parameters
trajecthe trajectory
fingerstarget finger positions

Implements fawkes::JacoArm.

Definition at line 150 of file arm_dummy.cpp.

References goto_joints().

◆ initialize()

void fawkes::JacoArmDummy::initialize ( )
virtual

Initialize the arm.

Implements fawkes::JacoArm.

Definition at line 89 of file arm_dummy.cpp.

References goto_ready().

◆ initialized()

bool fawkes::JacoArmDummy::initialized ( )
virtual

Check if arm is initialized.

Returns
is arm initialized?

Implements fawkes::JacoArm.

Definition at line 102 of file arm_dummy.cpp.

References fawkes::JacoArm::__initialized.

◆ push_joystick()

void fawkes::JacoArmDummy::push_joystick ( unsigned int  button)
virtual

Simulate a push of a button on the joystick of the Kinova Jaco arm.

Parameters
buttonthe id of the joystick button (from 0 to 15).

Implements fawkes::JacoArm.

Definition at line 133 of file arm_dummy.cpp.

◆ release_joystick()

void fawkes::JacoArmDummy::release_joystick ( )
virtual

Simulate releasing the joystick of the Kinova Jaco arm.

Implements fawkes::JacoArm.

Definition at line 138 of file arm_dummy.cpp.

◆ stop()

void fawkes::JacoArmDummy::stop ( )
virtual

Stop the current movement.

Implements fawkes::JacoArm.

Definition at line 128 of file arm_dummy.cpp.


The documentation for this class was generated from the following files: