Open 3D Engine ROS2 Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
ROS2::JointsManipulationRequests Class Referenceabstract

#include <JointsManipulationRequests.h>

Inherits AZ::EBusTraits.

Public Types

using BusIdType = AZ::EntityId
 
using JointsPositionsMap = AZStd::unordered_map< AZStd::string, JointPosition >
 
using JointsVelocitiesMap = AZStd::unordered_map< AZStd::string, JointVelocity >
 
using JointsEffortsMap = AZStd::unordered_map< AZStd::string, JointEffort >
 

Public Member Functions

virtual ManipulationJoints GetJoints ()=0
 
virtual AZ::Outcome< JointPosition, AZStd::string > GetJointPosition (const AZStd::string &jointName)=0
 
virtual AZ::Outcome< JointVelocity, AZStd::string > GetJointVelocity (const AZStd::string &jointName)=0
 
virtual JointsPositionsMap GetAllJointsPositions ()=0
 
virtual JointsVelocitiesMap GetAllJointsVelocities ()=0
 
virtual AZ::Outcome< JointEffort, AZStd::string > GetJointEffort (const AZStd::string &jointName)=0
 
virtual JointsEffortsMap GetAllJointsEfforts ()=0
 
virtual AZ::Outcome< void, AZStd::string > MoveJointsToPositions (const JointsPositionsMap &positions)=0
 
virtual AZ::Outcome< void, AZStd::string > MoveJointToPosition (const AZStd::string &jointName, JointPosition position)=0
 
virtual AZ::Outcome< void, AZStd::string > SetMaxJointEffort (const AZStd::string &jointName, JointEffort maxEffort)=0
 
virtual void Stop ()=0
 Stop the joints movement in progress. It will keep the position in which it stopped.
 

Static Public Attributes

static constexpr AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById
 

Detailed Description

Interface for general requests for joint systems such as manipulator arms. This interface supports only systems with joints or articulation links with a single degree of freedom (DOF) each.

Member Function Documentation

◆ GetAllJointsEfforts()

virtual JointsEffortsMap ROS2::JointsManipulationRequests::GetAllJointsEfforts ( )
pure virtual

Return efforts of all single DOF joints.

Returns
a vector of all joints efforts or error message.

◆ GetAllJointsPositions()

virtual JointsPositionsMap ROS2::JointsManipulationRequests::GetAllJointsPositions ( )
pure virtual

Return positions of all single DOF joints.

Returns
a vector of all joints relative positions in degree of motion range or error message.

◆ GetAllJointsVelocities()

virtual JointsVelocitiesMap ROS2::JointsManipulationRequests::GetAllJointsVelocities ( )
pure virtual

Return velocities of all single DOF joints.

Returns
a vector of all joints velocities or error message.

◆ GetJointEffort()

virtual AZ::Outcome< JointEffort, AZStd::string > ROS2::JointsManipulationRequests::GetJointEffort ( const AZStd::string &  jointName)
pure virtual

Get effort of a force-driven articulation link by name. If the joint is not an articulation link, or it's acceleration-driven, returns 0.

Parameters
jointNamename of the joint. Use names acquired from GetJoints() query.
Returns
outcome with effort if joint exists. If it does not exist or some other error happened, error message is returned.

◆ GetJointPosition()

virtual AZ::Outcome< JointPosition, AZStd::string > ROS2::JointsManipulationRequests::GetJointPosition ( const AZStd::string &  jointName)
pure virtual

Get position of a joint by name. Works with hinge joints and articulation links.

Parameters
jointNamename of the joint. Use names acquired from GetJoints() query.
Returns
outcome with relative position in degree of motion range if joint exists. If it does not exist or some other error happened, error message is returned.

◆ GetJoints()

virtual ManipulationJoints ROS2::JointsManipulationRequests::GetJoints ( )
pure virtual

Get all entity tree joints, including joint or articulation component hierarchy.

Returns
An unordered map of joint names to joint info structure.
Note
Only free joints are returned (no fixed ones).

◆ GetJointVelocity()

virtual AZ::Outcome< JointVelocity, AZStd::string > ROS2::JointsManipulationRequests::GetJointVelocity ( const AZStd::string &  jointName)
pure virtual

Get velocity of a joint by name. Works with hinge joints and articulation links.

Parameters
jointNamename of the joint. Use names acquired from GetJoints() query.
Returns
outcome with velocity if joint exists. If it does not exist or some other error happened, error message is returned.

◆ MoveJointsToPositions()

virtual AZ::Outcome< void, AZStd::string > ROS2::JointsManipulationRequests::MoveJointsToPositions ( const JointsPositionsMap &  positions)
pure virtual

Move specified joints into positions.

Parameters
newpositions for each named joint. Use names queried through GetJoints().
Returns
nothing on success, error message on failure.
Note
the movement is realized by a specific controller and not instant. The joints will then keep these positions.

◆ MoveJointToPosition()

virtual AZ::Outcome< void, AZStd::string > ROS2::JointsManipulationRequests::MoveJointToPosition ( const AZStd::string &  jointName,
JointPosition  position 
)
pure virtual

Move a single joint into desired relative position.

Parameters
jointNamename of the joint. Use names acquired from GetJoints() query.
positionrelative position in degree of motion range to achieve.
Returns
nothing on success, error message on failure.
Note
the movement is realized by a specific controller and not instant. The joints will then keep this position.

◆ SetMaxJointEffort()

virtual AZ::Outcome< void, AZStd::string > ROS2::JointsManipulationRequests::SetMaxJointEffort ( const AZStd::string &  jointName,
JointEffort  maxEffort 
)
pure virtual

Set max effort of an articulation link by name. If the joint is not an articulation link, doesn't do anything

Parameters
jointNamename of the joint. Use names acquired from GetJoints() query.
Returns
outcome with effort if joint exists. If it does not exist or some other error happened, error message is returned.

The documentation for this class was generated from the following file: