RosAgent
Inherits from: Robot
A class to represent a ROS-based robot agent.
This class inherits from Robot and implements ROS-specific functionality for
communicating with and controlling a robot through ROS topics.
RosAgent
RosAgent(client_config: dict, agent_dict: dict | None)
Initialize a ROS agent with the given client configuration.
Configuration dictionary specifying ROS clients and their parameters
agent_dict (dict | None), optional
defaults to None.
Optional dictionary of agent-specific parameters. Defaults to None.
create_clients
RosAgent.create_clients(client_config: dict, agent_config: dict | None)
Create ROS clients based on configuration.
Dictionary of client configurations
agent_config (dict | None)
Optional dictionary of agent parameters
getImage
RosAgent.getImage(name: str, image_type: str)
Get image from named image client.
image_type (str), optional
getPosition
RosAgent.getPosition(name: str)
Get position from named pose client.
Position | list: Position object or raw position data
getOrientation
RosAgent.getOrientation(name: str)
Get orientation from named pose client.
sendVelocity
RosAgent.sendVelocity(linear_vel: Velocity, angular_vel: Velocity, name: str)
Send velocity command to named velocity client.
sendPose
RosAgent.sendPose(position: Position, orientation: Orientation | None, name: str)
Send pose command to named pose client.
orientation (Orientation | None)
Target orientation (defaults to [0,0,0,1] if None)
getForce
RosAgent.getForce(name: str)
Gets the force from a named wrench client.
Force
Force of contact sensor as a vector
getTorque
RosAgent.getTorque(name: str)
Gets the torque from a named wrench client.
Torque
Torque of contact sensor as a vector
publishMsg
RosAgent.publishMsg(msg: dict, name: str)
Publish a message to a named generic client.
Name of the generic client
getMsg
RosAgent.getMsg(name: str)
Get a message from a named generic client.
Name of the generic client
run
stop