libkindrv 0.1
Loading...
Searching...
No Matches
KinDrv::JacoArm Class Reference

Main JacoArm class. All communication is done via an instance of this. More...

#include <kindrv.h>

Public Member Functions

 JacoArm ()
 
virtual ~JacoArm ()
 
void start_api_ctrl ()
 
void stop_api_ctrl ()
 
void start_force_ctrl ()
 
void stop_force_ctrl ()
 
jaco_position_t get_cart_pos ()
 
jaco_position_t get_ang_pos ()
 
jaco_position_t get_ang_command ()
 
jaco_position_t get_cart_command ()
 
jaco_position_t get_ang_vel ()
 
jaco_position_t get_cart_force ()
 
jaco_position_t get_ang_force ()
 
jaco_position_t get_ang_current ()
 
jaco_position_t get_ang_current_motor ()
 
jaco_sensor_info_t get_sensor_info ()
 
jaco_client_config_t get_client_config (bool refresh=true)
 
jaco_retract_mode_t get_status ()
 
void set_control_ang ()
 
void set_control_cart ()
 
void erase_trajectories ()
 
void push_joystick_button (unsigned short id)
 
void push_joystick_button (jaco_joystick_button_t &buttons)
 
void move_joystick_axis (jaco_joystick_axis_t &axes)
 
void move_joystick (jaco_joystick_t &state)
 
void release_joystick ()
 
void set_target (jaco_basic_traj_point_t &traj)
 
void set_target_cart (float x, float y, float z, float euler_1, float euler_2, float euler_3, float finger_1, float finger_2, float finger_3)
 
void set_target_cart (float coord[], float fingers[])
 
void set_target_ang (float j1, float j2, float j3, float j4, float j5, float j6, float finger_1, float finger_2, float finger_3)
 
void set_target_ang (float joints[], float fingers[])
 

Detailed Description

Main JacoArm class. All communication is done via an instance of this.

Constructor & Destructor Documentation

◆ JacoArm()

KinDrv::JacoArm::JacoArm ( )

Constructor. Connects to first available/free arm on USB port.

◆ ~JacoArm()

KinDrv::JacoArm::~JacoArm ( )
virtual

Destructor.

Member Function Documentation

◆ erase_trajectories()

void KinDrv::JacoArm::erase_trajectories ( )

Erase all queued trajectores.

◆ get_ang_command()

jaco_position_t KinDrv::JacoArm::get_ang_command ( )

Get current angular command of the arm.

Returns
universal position struct that contains the current joint command

◆ get_ang_current()

jaco_position_t KinDrv::JacoArm::get_ang_current ( )

Get currents that each actuator of the arm consumes on the main supply.

Returns
universal position struct that contains the joint currents

◆ get_ang_current_motor()

jaco_position_t KinDrv::JacoArm::get_ang_current_motor ( )

Get current readings on each actuator of the arm.

Returns
universal position struct that contains the joint currents

◆ get_ang_force()

jaco_position_t KinDrv::JacoArm::get_ang_force ( )

Get current angular forces of the arm.

Returns
universal position struct that contains the current angular forces

◆ get_ang_pos()

jaco_position_t KinDrv::JacoArm::get_ang_pos ( )

Get current angular position of Jaco arm.

Returns
position struct that contains the current joint values

◆ get_ang_vel()

jaco_position_t KinDrv::JacoArm::get_ang_vel ( )

Get current angular velocities of the arm.

Returns
universal position struct that contains the current joint velocities

◆ get_cart_command()

jaco_position_t KinDrv::JacoArm::get_cart_command ( )

Get current angular velocities of the arm.

Returns
universal position struct that contains the current joint velocities

◆ get_cart_force()

jaco_position_t KinDrv::JacoArm::get_cart_force ( )

Get current cartesian forces of the arm.

Returns
universal position struct that contains the current cartesian forces

◆ get_cart_pos()

jaco_position_t KinDrv::JacoArm::get_cart_pos ( )

Get current cartesian position of Jaco arm. Additionally, this is the method that can fetch joint values of the fingers. Rememer, that at the moment the Jaco firmware can only provide updated cartesian position if the arm is set to CartesianControl mode!

Returns
position struct that contains the current joint values

◆ get_client_config()

jaco_client_config_t KinDrv::JacoArm::get_client_config ( bool refresh = true)

Get the current client information of Jaco arm. This method gets the client information (ID, SerialNumber,..) of the arm.

Parameters
refreshFalse, if cached values should be used (they usually need to be read just once). True, if the values should be read from the arm (default).
Returns
The current client information

◆ get_sensor_info()

jaco_sensor_info_t KinDrv::JacoArm::get_sensor_info ( )

Get the voltage, current, acceleration, temperature sensor readings of the arm.

Returns
sensor info struct that contains the sensor values

◆ get_status()

jaco_retract_mode_t KinDrv::JacoArm::get_status ( )

Get the current retract mode of Jaco arm. This method can be for instance be useful to decide when, which and how many joystick buttons to simulate to move into/from HOME/RETRACT position.

Returns
the retract mode (check enum jaco_retract_mode)

◆ move_joystick()

void KinDrv::JacoArm::move_joystick ( jaco_joystick_t & state)

Simulate the global joystick state. The joystick state is a combination of button values and axes state.

Parameters
stateThe joystick state contatining button and axes values

◆ move_joystick_axis()

void KinDrv::JacoArm::move_joystick_axis ( jaco_joystick_axis_t & axes)

Simulate joystick movement along the joystick axes. This sets momentary values for the axes, so in order to stop the movement you need to reset the values, or call release_joystick().

Parameters
axesThe struct containing the values for axes movement

◆ push_joystick_button() [1/2]

void KinDrv::JacoArm::push_joystick_button ( jaco_joystick_button_t & buttons)

Simulate a push of multiple joystick buttons. These buttons are "pushed" until the user calls a relase_joystick().

Parameters
buttonsThe struct containing the values for each button

◆ push_joystick_button() [2/2]

void KinDrv::JacoArm::push_joystick_button ( unsigned short id)

Simulate a push of a joystick button. The button is held until the user calls a relase_joystick()!!

Parameters
idThe id of the joystick (from 0 to 15)

◆ release_joystick()

void KinDrv::JacoArm::release_joystick ( )

Simulate a release of a joystick button. This automatically stops any arm movement, so this method is very convenient as a kind of "stop"-command to the arm!

◆ set_control_ang()

void KinDrv::JacoArm::set_control_ang ( )

Set arm control type to angular control.

◆ set_control_cart()

void KinDrv::JacoArm::set_control_cart ( )

Set arm control type to cartesian control.

◆ set_target()

void KinDrv::JacoArm::set_target ( jaco_basic_traj_point_t & traj)

Move the arm to a given position (trajectory point).

Parameters
trajThe trajectory point that the arm should move to (check jaco_basic_traj_point_t)

◆ set_target_ang() [1/2]

void KinDrv::JacoArm::set_target_ang ( float j1,
float j2,
float j3,
float j4,
float j5,
float j6,
float finger_1,
float finger_2,
float finger_3 )

Move the arm to a given position (trajectory point).

Parameters
j1Angular value of joint 1
j2Angular value of joint 2
j3Angular value of joint 3
j4Angular value of joint 4
j5Angular value of joint 5
j6Angular value of joint 6
finger_1Value of 1st finger
finger_2Value of 2nd finger
finger_3Value of 3rd finger

◆ set_target_ang() [2/2]

void KinDrv::JacoArm::set_target_ang ( float joints[],
float fingers[] )

Move the arm to a given position (trajectory point).

Parameters
jointsArray of 6 floats containing angular values for each joint
fingersArray of 3 floats containing finger values

◆ set_target_cart() [1/2]

void KinDrv::JacoArm::set_target_cart ( float coord[],
float fingers[] )

Move the arm to a given position (trajectory point).

Parameters
coordArray of 6 floats containing translation and rotation
fingersArray of 3 floats containing finger values

◆ set_target_cart() [2/2]

void KinDrv::JacoArm::set_target_cart ( float x,
float y,
float z,
float euler_1,
float euler_2,
float euler_3,
float finger_1,
float finger_2,
float finger_3 )

Move the arm to a given position (trajectory point).

Parameters
xTranslation on x-axis
yTranslation on y-axis
zTranslation on z-axis
euler_11st Euler rotation
euler_22nd Euler rotation
euler_33rd Euler rotation
finger_1Value of 1st finger
finger_2Value of 2nd finger
finger_3Value of 3rd finger

◆ start_api_ctrl()

void KinDrv::JacoArm::start_api_ctrl ( )

Start/enable controlling the arm via API/USB. The default is that a connected joystick takes over control as soon as activated. It is recommended to use this command before sending other commands to the arm!

◆ start_force_ctrl()

void KinDrv::JacoArm::start_force_ctrl ( )

Start/enable force control / compliant mode.

◆ stop_api_ctrl()

void KinDrv::JacoArm::stop_api_ctrl ( )

Stop/disable controlling the arm via API/USB. This method should only be used in very rare occasions, it 'might' break some behaviour if the control is suddenly take away. If you want the arm to stop moving, use the release_joystick() method. Remember to start_api_ctrl() afterwards if you want to use the API again.

◆ stop_force_ctrl()

void KinDrv::JacoArm::stop_force_ctrl ( )

Stop/disable force control / compliant mode.


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