Class EntityPoseSetter
Defined in File set_entity_pose.hpp
Inheritance Relationships
Base Type
public rclcpp::Node
Class Documentation
-
class EntityPoseSetter : public rclcpp::Node
A ROS 2 node for setting entity poses in a Gazebo simulation.
Public Functions
-
EntityPoseSetter()
Default constructor. Initializes the node and pose setter client.
Constructor that accepts an external pose service client.
- Parameters:
client – [in] Shared pointer to the set entity pose service client.
-
bool set_entity_pose(const std::string &entity_name, int entity_id, int entity_type, double x, double y, double z, double qx, double qy, double qz, double qw, bool use_quaternion = true)
Sets the pose of an entity in the simulation.
- Parameters:
entity_name – [in] Name of the entity.
entity_id – [in] ID of the entity.
entity_type – [in] Type of the entity.
x – [in] X position coordinate.
y – [in] Y position coordinate.
z – [in] Z position coordinate.
qx – [in] First orientation parameter (quaternion X component or roll angle).
qy – [in] Second orientation parameter (quaternion Y component or pitch angle).
qz – [in] Third orientation parameter (quaternion Z component or yaw angle).
qw – [in] Fourth orientation parameter (quaternion W component, ignored for ] Euler angles).
use_quaternion – [in] If true, orientation parameters are interpreted as quaternion components. If false, they are interpreted as Euler angles (roll, pitch, yaw).
- Returns:
True if the entity pose was set successfully, false otherwise.
Protected Attributes
-
rclcpp::Client<ros_gz_interfaces::srv::SetEntityPose>::SharedPtr client_
Client used to call the set entity pose service.
-
EntityPoseSetter()