Class SpeedInAPlaneMotion

Inheritance Relationships

Base Type

Class Documentation

class SpeedInAPlaneMotion : public as2::motionReferenceHandlers::BasicMotionReferenceHandler

The SpeedInAPlaneMotion class is a motion reference handler that moves the robot at a given speed.

Public Functions

explicit SpeedInAPlaneMotion(as2::Node *node_ptr, const std::string &ns = "")

PositionMotion Constructor.

Parameters:

nodeas2::Node pointer.

inline ~SpeedInAPlaneMotion()
bool ownSendCommand()

ownSendCommand sends pose and twist messages.

Returns:

true if commands was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const float yaw_speed)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw speed. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • yaw_speed – Yaw speed in radians/s.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw speed. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • pose – PoseStamped message that represents the height.

  • twist – TwistStamped message that represents the linear velocity and yaw speed.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const float yaw_angle)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • yaw_angle – Yaw angle in radians.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float vx, const float vy, const std::string &frame_id_pose, const float hz, const geometry_msgs::msg::Quaternion &q)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • frame_id_yaw – frame id of the height and yaw angle command.

  • hz – Height in the z axis.

  • q – Quaternion that represents the yaw angle.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::TwistStamped &twist)

sendSpeedInAPlaneCommandWithYawAngle sends a speed in a plane command to the robot with a yaw angle. The speed plane command is sent in the frame id frame. The linear velocity is given in m/s. The height command is sent in the frame id frame. The height is given in m.

Parameters:
  • pose – PoseStamped message that represents the height and yaw angle.

  • twist – TwistStamped message that represents the linear velocity.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const float &yaw_angle)

sendSpeedInAPlaneCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • hz – Height in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • yaw_angle – Yaw angle in radians.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawAngle(const std::string &frame_id_speed, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const geometry_msgs::msg::Quaternion &q)

sendSpeedInAPlaneCommandWithYawAngle sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s.

Parameters:
  • frame_id_speed – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • hz – Height in the z axis.

  • frame_id_yaw – frame id of the yaw angle command.

  • q – Quaternion that represents the yaw angle.

Returns:

true if the command was sent successfully, false otherwise.

bool sendSpeedInAPlaneCommandWithYawSpeed(const std::string &frame_id, const float &vx, const float &vy, const std::string &frame_id_pose, const float &hz, const float &yaw_speed)

sendSpeedInAPlaneCommandWithYawSpeed sends a speed command to the robot. The speed command is sent in the input frame id. The linear velocity is given in m/s. The yaw speed is given in rad/s.

Parameters:
  • frame_id – frame id of the velocity command.

  • vx – Linear velocity in the x axis.

  • vy – Linear velocity in the y axis.

  • vz – Linear velocity in the z axis.

  • yaw_speed – Yaw speed in rad/s.

Returns:

true if the command was sent successfully, false otherwise.