A class that offers an implementation of a virtual wall for a single joint.
More...
#include <joint_wall.h>
|
double | computeTorque (double q, double dq) |
| Computes the torque with given q and dq. More...
|
|
| JointWall ()=delete |
| Creates a JointWall instance with default params. More...
|
|
| JointWall (double soft_upper_joint_position_limit, double soft_lower_joint_position_limit, double PD_zone_width, double D_zone_width, double PD_zone_stiffness, double PD_zone_damping, double D_zone_damping) |
| Creates a JointWall instance with configurable parameters. More...
|
|
void | reset () |
| Resets the initialized flag to false. More...
|
|
|
static bool | inRange (double low, double high, double x) |
| Checks if x is in range [low, high]. More...
|
|
static double | positiveCheck (double value) |
| Check if the input is positive number, if not print error and return its abs. More...
|
|
A class that offers an implementation of a virtual wall for a single joint.
Definition at line 22 of file joint_wall.h.
◆ MotionInWall
Indicates the status of moving wall, which occurs after initializing the state inside a wall.
Enumerator |
---|
EnteringNormal | |
PenetratingLowerLimit | |
LeavingLowerLimit | |
PenetratingUpperLimit | |
LeavingUpperLimit | |
Definition at line 68 of file joint_wall.h.
◆ JointWall() [1/2]
franka_example_controllers::JointWall::JointWall |
( |
| ) |
|
|
delete |
Creates a JointWall instance with default params.
◆ JointWall() [2/2]
franka_example_controllers::JointWall::JointWall |
( |
double |
soft_upper_joint_position_limit, |
|
|
double |
soft_lower_joint_position_limit, |
|
|
double |
PD_zone_width, |
|
|
double |
D_zone_width, |
|
|
double |
PD_zone_stiffness, |
|
|
double |
PD_zone_damping, |
|
|
double |
D_zone_damping |
|
) |
| |
Creates a JointWall instance with configurable parameters.
- Parameters
-
[in] | soft_upper_joint_position_limit | (rad) |
[in] | soft_lower_joint_position_limit | (rad) |
[in] | PD_zone_width | (meter) |
[in] | D_zone_width | (meter) |
[in] | PD_zone_stiffness | (N*meter/rad) |
[in] | PD_zone_damping | (N*meter*s/rad) |
[in] | D_zone_damping | (N*meter*s/rad) |
Definition at line 12 of file joint_wall.cpp.
◆ adjustMovingWall()
void franka_example_controllers::JointWall::adjustMovingWall |
( |
double |
q, |
|
|
double |
dq |
|
) |
| |
|
private |
Moves the wall with given state if the state is initialized inside the wall.
- Parameters
-
[in] | q | the current joint position. |
[in] | dq | the current joint velocity. |
Definition at line 102 of file joint_wall.cpp.
◆ computeTorque()
double franka_example_controllers::JointWall::computeTorque |
( |
double |
q, |
|
|
double |
dq |
|
) |
| |
Computes the torque with given q and dq.
Be aware that the torque is also affected by previous states.
- Parameters
-
[in] | q | current joint position. |
[in] | dq | the current joint velocity. |
- Returns
- the resulting torque
Definition at line 33 of file joint_wall.cpp.
◆ getMotionInWall()
Checks the motion type in joint wall.
- Parameters
-
[in] | q | the current joint position. |
[in] | dq | the current joint velocity. |
Definition at line 135 of file joint_wall.cpp.
◆ init()
void franka_example_controllers::JointWall::init |
( |
double |
q, |
|
|
double |
dq |
|
) |
| |
|
private |
Initializes the joint wall computation with initial states.
- Parameters
-
[in] | q | the current joint position. |
[in] | dq | the current joint velocity. |
Definition at line 70 of file joint_wall.cpp.
◆ inRange()
bool franka_example_controllers::JointWall::inRange |
( |
double |
low, |
|
|
double |
high, |
|
|
double |
x |
|
) |
| |
|
staticprivate |
Checks if x is in range [low, high].
- Parameters
-
[in] | low | lower limit of the range. |
[in] | high | upper limit of the range. |
[in] | x | value to check. |
- Returns
- true if in range, false otherwise.
Definition at line 66 of file joint_wall.cpp.
◆ positiveCheck()
double franka_example_controllers::JointWall::positiveCheck |
( |
double |
value | ) |
|
|
staticprivate |
Check if the input is positive number, if not print error and return its abs.
- Parameters
-
[in] | value | The value to check. |
- Returns
- the absolute value of the value.
Definition at line 126 of file joint_wall.cpp.
◆ reset()
void franka_example_controllers::JointWall::reset |
( |
| ) |
|
Resets the initialized flag to false.
After calling reset, the next call to computeTorque resets the internal states for joint position and velocity (q, dq). Call this method before restarting your controller, e.g. when the position might have changed during control pauses due to guiding.
Definition at line 62 of file joint_wall.cpp.
◆ D_zone_damping_
double franka_example_controllers::JointWall::D_zone_damping_ {0} |
|
private |
◆ D_zone_width_
double franka_example_controllers::JointWall::D_zone_width_ {0} |
|
private |
◆ initialized_
bool franka_example_controllers::JointWall::initialized_ {false} |
|
private |
◆ moving_wall_
bool franka_example_controllers::JointWall::moving_wall_ {false} |
|
private |
◆ PD_zone_damping_
double franka_example_controllers::JointWall::PD_zone_damping_ {0} |
|
private |
◆ PD_zone_stiffness_
double franka_example_controllers::JointWall::PD_zone_stiffness_ {0} |
|
private |
◆ PD_zone_width_
double franka_example_controllers::JointWall::PD_zone_width_ {0} |
|
private |
◆ soft_lower_joint_position_limit_
double franka_example_controllers::JointWall::soft_lower_joint_position_limit_ {0} |
|
private |
◆ soft_upper_joint_position_limit_
double franka_example_controllers::JointWall::soft_upper_joint_position_limit_ {0} |
|
private |
◆ zone_width_scale_
double franka_example_controllers::JointWall::zone_width_scale_ {1} |
|
private |
The documentation for this class was generated from the following files: