Skip to content

Latest commit

 

History

History
175 lines (107 loc) · 4.03 KB

Manpage.coordinate.md

File metadata and controls

175 lines (107 loc) · 4.03 KB

libypspur - coordinate system

Get vehicle pose

Name

Spur_get_pos_GL, Spur_get_pos_LC

Synopsis

double Spur_get_pos_GL(double *x, double *y, double *th);
double Spur_get_pos_LC(double *x, double *y, double *th);

Description

Get vehicle position and orientation on desired coordinate system.

  • *x: pointer to store x position of the vehicle [m]
  • *y: pointer to store y position of the vehicle [m]
  • *th: pointer to store yaw orientation of the vehicle [rad]

Return value

On success, timestamp (unix time) of the data is returned. On error, -1 is returned.


Set coordinate system

Name

Spur_set_pos_GL, Spur_set_pos_LC

Synopsis

int Spur_set_pos_GL(double x, double y, double th);
int Spur_set_pos_LC(double x, double y, double th);

Description

Set relation between the desired coordinate system and its parent coordinate system to make vehicle position and orientation desired.

  • x: x position of the vehicle [m]
  • y: y position of the vehicle [m]
  • th: yaw orientation of the vehicle [rad]

Return value

On success, 1 is returned. On error, -1 is returned.


Adjust coordinate system

Name

Spur_adjust_pos_GL, Spur_adjust_pos_LC, Spur_adjust_pos_FS

Synopsis

int Spur_adjust_pos_GL(double x, double y, double th);
int Spur_adjust_pos_LC(double x, double y, double th);
int Spur_adjust_pos_FS(double x, double y, double th);

Description

Set relation between the root coordinate system (BS) and global (GL) coordinate system to make vehicle position and orientation desired. Running vehicle control command is updated according to the adjusted coordinate system.

  • x: x position of the vehicle [m]
  • y: y position of the vehicle [m]
  • th: yaw orientation of the vehicle [rad]

Return value

On success, 1 is returned. On error, -1 is returned.


Checking whether getting over the line

Name

Spur_over_line_GL, Spur_over_line_LC, Spur_over_line_FS

Synopsis

int Spur_over_line_GL(double x, double y, double th);
int Spur_over_line_LC(double x, double y, double th);
int Spur_over_line_FS(double x, double y, double th);

Description

Check whether the vehicle gets over the desired line.

  • x: x position of a point where the desired line [m]
  • y: y position of the point [m]
  • th: orthogonal yaw orientation of the line [rad]

Parameters for checking whether getting over the line

Return value

On success, 1 is returned if the vehicle gets over the line, and 0 is returned elsewise. On error, -1 is returned.


Checking whether getting near the position

Name

Spur_near_pos_GL, Spur_near_pos_LC

Synopsis

int Spur_near_pos_GL(double x, double y, double d);
int Spur_near_pos_LC(double x, double y, double d);

Description

Check whether the vehicle gets near the desired position.

  • x: x position of the desired point [m]
  • y: y position of the desired point [m]
  • d: tolerance [m]

Parameters for checking whether the vehicle gets near the desired position.

Return value

On success, 1 is returned if the vehicle gets near the position and 0 is returned elsewise. On error, -1 is returned.


Checking whether getting near the orientation

Name

Spur_near_angle_GL, Spur_near_angle_LC

Synopsis

int Spur_near_pos_GL(double th, double d);
int Spur_near_pos_LC(double th, double d);

Description

Check whether the vehicle gets near the desired orientation.

  • th: yaw orientation of the desired orientation [rad]
  • d: tolerance [rad]

Parameters for checking whether the vehicle gets near the desired position.

Return value

On success, 1 is returned if the vehicle gets near the orientation, and 0 is returned elsewise. On error, -1 is returned.