PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
|
Classes | |
class | px4_ros2::MapProjection |
Provides methods to convert between the geographical coordinate system ("global") and the local azimuthal equidistant plane ("local"). More... | |
float | px4_ros2::horizontalDistanceToGlobalPosition (const Eigen::Vector2d &global_position_now, const Eigen::Vector2d &global_position_next) |
Compute the horizontal distance between two global positions in meters. More... | |
static float | px4_ros2::horizontalDistanceToGlobalPosition (const Eigen::Vector3d &global_position_now, const Eigen::Vector3d &global_position_next) |
Compute the horizontal distance between two global positions in meters. More... | |
float | px4_ros2::distanceToGlobalPosition (const Eigen::Vector3d &global_position_now, const Eigen::Vector3d &global_position_next) |
Compute the distance between two global positions in meters. More... | |
float | px4_ros2::headingToGlobalPosition (const Eigen::Vector2d &global_position_now, const Eigen::Vector2d &global_position_next) |
Compute the heading to the next global position in radians. More... | |
static float | px4_ros2::headingToGlobalPosition (const Eigen::Vector3d &global_position_now, const Eigen::Vector3d &global_position_next) |
Compute the heading to the next global position in radians. More... | |
Eigen::Vector2f | px4_ros2::vectorToGlobalPosition (const Eigen::Vector2d &global_position_now, const Eigen::Vector2d &global_position_next) |
Compute the vector to the next global position in meters. More... | |
static Eigen::Vector3f | px4_ros2::vectorToGlobalPosition (const Eigen::Vector3d &global_position_now, const Eigen::Vector3d &global_position_next) |
Compute the vector to the next global position in meters. More... | |
Eigen::Vector2d | px4_ros2::globalPositionFromLineAndDist (const Eigen::Vector2d &global_position_line_start, const Eigen::Vector2d &global_position_line_end, float dist_from_start) |
Compute the global position on the line vector defined by two positions (start -> end) at a certain distance from global position 'start'. More... | |
Eigen::Vector2d | px4_ros2::globalPositionFromHeadingAndDist (const Eigen::Vector2d &global_position_now, float heading, float dist) |
Compute the global position given another global position, distance and heading see http://www.movable-type.co.uk/scripts/latlong.html. More... | |
static Eigen::Vector3d | px4_ros2::globalPositionFromHeadingAndDist (const Eigen::Vector3d &global_position_now, float heading, float dist) |
Compute the global position given another global position, distance and heading see http://www.movable-type.co.uk/scripts/latlong.html. More... | |
Eigen::Vector2d | px4_ros2::addVectorToGlobalPosition (const Eigen::Vector2d &global_position, const Eigen::Vector2f &vector_ne) |
Compute the global position from adding a local frame vector to the current global position. More... | |
static Eigen::Vector3d | px4_ros2::addVectorToGlobalPosition (const Eigen::Vector3d &global_position, const Eigen::Vector3f &vector_ned) |
Compute the global position from adding a local frame vector to the current global position. More... | |
This group contains helper functions to convert points between the geographical coordinate system ("global") and the local azimuthal equidistant plane ("local"). Additionaly it provides methods for commonly used geodesic operations.
Latitude and longitude are in degrees (degrees: 8.1234567°, not 81234567°). Altitude is in meters in the above mean sea level (AMSL) frame. Heading is in radians starting North going clockwise.
Eigen::Vector2d px4_ros2::addVectorToGlobalPosition | ( | const Eigen::Vector2d & | global_position, |
const Eigen::Vector2f & | vector_ne | ||
) |
Compute the global position from adding a local frame vector to the current global position.
global_position | current lat [deg], lon [deg] |
vector_ne | local vector to add [m^2] (NE) |
|
inlinestatic |
Compute the global position from adding a local frame vector to the current global position.
global_position | current lat [deg], lon [deg], alt AMSL [m] |
vector_ned | local vector to add [m^3] (NED) |
float px4_ros2::distanceToGlobalPosition | ( | const Eigen::Vector3d & | global_position_now, |
const Eigen::Vector3d & | global_position_next | ||
) |
Compute the distance between two global positions in meters.
global_position_now | current lat [deg], lon [deg] |
global_position_next | next lat [deg], lon [deg] |
Eigen::Vector2d px4_ros2::globalPositionFromHeadingAndDist | ( | const Eigen::Vector2d & | global_position_now, |
float | heading, | ||
float | dist | ||
) |
Compute the global position given another global position, distance and heading see http://www.movable-type.co.uk/scripts/latlong.html.
global_position_now | current lat [deg], lon [deg] |
heading | heading from the current position [rad] (clockwise) |
dist | distance from the current position [m] |
|
inlinestatic |
Compute the global position given another global position, distance and heading see http://www.movable-type.co.uk/scripts/latlong.html.
global_position_now | current lat [deg], lon [deg] |
heading | heading from the current position [rad] (clockwise) |
dist | distance from the current position [m] |
Eigen::Vector2d px4_ros2::globalPositionFromLineAndDist | ( | const Eigen::Vector2d & | global_position_line_start, |
const Eigen::Vector2d & | global_position_line_end, | ||
float | dist_from_start | ||
) |
Compute the global position on the line vector defined by two positions (start -> end) at a certain distance from global position 'start'.
global_position_line_start | line start lat [deg], lon [deg] |
global_position_line_end | line end lat [deg], lon [deg] |
dist_from_start | distance [m] of target global position from position 'start' towards position 'end' (can be negative) |
float px4_ros2::headingToGlobalPosition | ( | const Eigen::Vector2d & | global_position_now, |
const Eigen::Vector2d & | global_position_next | ||
) |
Compute the heading to the next global position in radians.
global_position_now | current lat [deg], lon [deg] |
global_position_next | next lat [deg], lon [deg] |
|
inlinestatic |
Compute the heading to the next global position in radians.
global_position_now | current lat [deg], lon [deg], alt AMSL [m] |
global_position_next | next lat [deg], lon [deg], alt AMSL [m] |
float px4_ros2::horizontalDistanceToGlobalPosition | ( | const Eigen::Vector2d & | global_position_now, |
const Eigen::Vector2d & | global_position_next | ||
) |
Compute the horizontal distance between two global positions in meters.
global_position_now | current lat [deg], lon [deg] |
global_position_next | next lat [deg], lon [deg] |
|
inlinestatic |
Compute the horizontal distance between two global positions in meters.
global_position_now | current lat [deg], lon [deg], alt AMSL [m] |
global_position_next | next lat [deg], lon [deg], alt AMSL [m] |
Eigen::Vector2f px4_ros2::vectorToGlobalPosition | ( | const Eigen::Vector2d & | global_position_now, |
const Eigen::Vector2d & | global_position_next | ||
) |
Compute the vector to the next global position in meters.
global_position_now | current lat [deg], lon [deg] |
global_position_next | next lat [deg], lon [deg] |
|
inlinestatic |
Compute the vector to the next global position in meters.
global_position_now | current lat [deg], lon [deg], alt AMSL [m] |
global_position_next | next lat [deg], lon [deg], alt AMSL [m] |