$search

angles Namespace Reference

Functions

static bool find_min_max_delta (double from, double left_limit, double right_limit, double &result_min_delta, double &result_max_delta)
 This function is only intended for internal use and not intended for external use. If you do use it, read the documentation very carefully. Returns the min and max amount (in radians) that can be moved from "from" angle to "left_limit" and "right_limit".
static double from_degrees (double degrees)
 Convert degrees to radians.
static double normalize_angle (double angle)
 normalize
static double normalize_angle_positive (double angle)
 normalize_angle_positive
static double shortest_angular_distance (double from, double to)
 shortest_angular_distance
static bool shortest_angular_distance_with_limits (double from, double to, double left_limit, double right_limit, double &shortest_angle)
 Returns the delta from "from_angle" to "to_angle" making sure it does not violate limits specified by left_limit and right_limit. The valid interval of angular positions is [left_limit,right_limit]. E.g., [-0.25,0.25] is a 0.5 radians wide interval that contains 0. But [0.25,-0.25] is a 2*M_PI-0.5 wide interval that contains M_PI (but not 0). The value of shortest_angle is the angular difference between "from" and "to" that lies within the defined valid interval. E.g. shortest_angular_distance_with_limits(-0.5,0.5,0.25,-0.25,ss) evaluates ss to 2*M_PI-1.0 and returns true while shortest_angular_distance_with_limits(-0.5,0.5,-0.25,0.25,ss) returns false since -0.5 and 0.5 do not lie in the interval [-0.25,0.25].
static double to_degrees (double radians)
 Convert radians to degrees.
static double two_pi_complement (double angle)
 returns the angle in [-2*M_PI, 2*M_PI] going the other way along the unit circle.

Function Documentation

static bool angles::find_min_max_delta ( double  from,
double  left_limit,
double  right_limit,
double &  result_min_delta,
double &  result_max_delta 
) [static]

This function is only intended for internal use and not intended for external use. If you do use it, read the documentation very carefully. Returns the min and max amount (in radians) that can be moved from "from" angle to "left_limit" and "right_limit".

Returns:
returns false if "from" angle does not lie in the interval [left_limit,right_limit]
Parameters:
from - "from" angle - must lie in [-M_PI, M_PI)
left_limit - left limit of valid interval for angular position - must lie in [-M_PI, M_PI], left and right limits are specified on the unit circle w.r.t to a reference pointing inwards
right_limit - right limit of valid interval for angular position - must lie in [-M_PI, M_PI], left and right limits are specified on the unit circle w.r.t to a reference pointing inwards
result_min_delta - minimum (delta) angle (in radians) that can be moved from "from" position before hitting the joint stop
result_max_delta - maximum (delta) angle (in radians) that can be movedd from "from" position before hitting the joint stop

Definition at line 148 of file angles.h.

static double angles::from_degrees ( double  degrees  )  [inline, static]

Convert degrees to radians.

Definition at line 49 of file angles.h.

static double angles::normalize_angle ( double  angle  )  [inline, static]

normalize

Normalizes the angle to be -M_PI circle to +M_PI circle It takes and returns radians.

Definition at line 82 of file angles.h.

static double angles::normalize_angle_positive ( double  angle  )  [inline, static]

normalize_angle_positive

Normalizes the angle to be 0 to 2*M_PI It takes and returns radians.

Definition at line 69 of file angles.h.

static double angles::shortest_angular_distance ( double  from,
double  to 
) [inline, static]

shortest_angular_distance

Given 2 angles, this returns the shortest angular difference. The inputs and ouputs are of course radians.

The result would always be -pi <= result <= pi. Adding the result to "from" will always get you an equivelent angle to "to".

Definition at line 103 of file angles.h.

static bool angles::shortest_angular_distance_with_limits ( double  from,
double  to,
double  left_limit,
double  right_limit,
double &  shortest_angle 
) [inline, static]

Returns the delta from "from_angle" to "to_angle" making sure it does not violate limits specified by left_limit and right_limit. The valid interval of angular positions is [left_limit,right_limit]. E.g., [-0.25,0.25] is a 0.5 radians wide interval that contains 0. But [0.25,-0.25] is a 2*M_PI-0.5 wide interval that contains M_PI (but not 0). The value of shortest_angle is the angular difference between "from" and "to" that lies within the defined valid interval. E.g. shortest_angular_distance_with_limits(-0.5,0.5,0.25,-0.25,ss) evaluates ss to 2*M_PI-1.0 and returns true while shortest_angular_distance_with_limits(-0.5,0.5,-0.25,0.25,ss) returns false since -0.5 and 0.5 do not lie in the interval [-0.25,0.25].

Returns:
true if "from" and "to" positions are within the limit interval, false otherwise
Parameters:
from - "from" angle
to - "to" angle
left_limit - left limit of valid interval for angular position, left and right limits are specified on the unit circle w.r.t to a reference pointing inwards
right_limit - right limit of valid interval for angular position, left and right limits are specified on the unit circle w.r.t to a reference pointing inwards
shortest_angle - result of the shortest angle calculation

Definition at line 223 of file angles.h.

static double angles::to_degrees ( double  radians  )  [inline, static]

Convert radians to degrees.

Definition at line 57 of file angles.h.

static double angles::two_pi_complement ( double  angle  )  [inline, static]

returns the angle in [-2*M_PI, 2*M_PI] going the other way along the unit circle.

Parameters:
angle The angle to which you want to turn in the range [-2*M_PI, 2*M_PI] E.g. two_pi_complement(-M_PI/4) returns 7_M_PI/4 two_pi_complement(M_PI/4) returns -7*M_PI/4

Definition at line 124 of file angles.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


angles
Author(s): John Hsu, Ioan Sucan
autogenerated on Tue Mar 5 11:58:16 2013