Main JacoArm class. All communication is done via an instance of this.
More...
#include <kindrv.h>
|
| 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[]) |
|
Main JacoArm class. All communication is done via an instance of this.
◆ JacoArm()
KinDrv::JacoArm::JacoArm |
( |
| ) |
|
Constructor. Connects to first available/free arm on USB port.
◆ ~JacoArm()
KinDrv::JacoArm::~JacoArm |
( |
| ) |
|
|
virtual |
◆ erase_trajectories()
void KinDrv::JacoArm::erase_trajectories |
( |
| ) |
|
Erase all queued trajectores.
◆ get_ang_command()
Get current angular command of the arm.
- Returns
- universal position struct that contains the current joint command
◆ 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()
Get current readings on each actuator of the arm.
- Returns
- universal position struct that contains the joint currents
◆ get_ang_force()
Get current angular forces of the arm.
- Returns
- universal position struct that contains the current angular forces
◆ get_ang_pos()
Get current angular position of Jaco arm.
- Returns
- position struct that contains the current joint values
◆ get_ang_vel()
Get current angular velocities of the arm.
- Returns
- universal position struct that contains the current joint velocities
◆ get_cart_command()
Get current angular velocities of the arm.
- Returns
- universal position struct that contains the current joint velocities
◆ get_cart_force()
Get current cartesian forces of the arm.
- Returns
- universal position struct that contains the current cartesian forces
◆ 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()
Get the current client information of Jaco arm. This method gets the client information (ID, SerialNumber,..) of the arm.
- Parameters
-
refresh | False, 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()
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()
Simulate the global joystick state. The joystick state is a combination of button values and axes state.
- Parameters
-
state | The joystick state contatining button and axes values |
◆ move_joystick_axis()
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
-
axes | The 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
-
buttons | The 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
-
id | The 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()
Move the arm to a given position (trajectory point).
- Parameters
-
◆ 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
-
j1 | Angular value of joint 1 |
j2 | Angular value of joint 2 |
j3 | Angular value of joint 3 |
j4 | Angular value of joint 4 |
j5 | Angular value of joint 5 |
j6 | Angular value of joint 6 |
finger_1 | Value of 1st finger |
finger_2 | Value of 2nd finger |
finger_3 | Value 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
-
joints | Array of 6 floats containing angular values for each joint |
fingers | Array 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
-
coord | Array of 6 floats containing translation and rotation |
fingers | Array 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
-
x | Translation on x-axis |
y | Translation on y-axis |
z | Translation on z-axis |
euler_1 | 1st Euler rotation |
euler_2 | 2nd Euler rotation |
euler_3 | 3rd Euler rotation |
finger_1 | Value of 1st finger |
finger_2 | Value of 2nd finger |
finger_3 | Value 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: