Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
ZenohAgent
Inherits from: Robot
A class to represent a Zenoh-based robot agent.
This class inherits from Robot and implements Zenoh-specific functionality for
communicating with and controlling a robot through Zenoh topics.
Attributes:
config (dict): Configuration dictionary for Zenoh clients. Please see our Zenoh documentation for more details.
clients (dict): Dictionary of Zenoh client objects
Inherited methods
- From
Robot: addSensor, getState, moveByVelocity, cleanup
init
ZenohAgent.__init__(client_config: dict, agent_dict: Optional[dict] = None)
Initialize a Zenoh agent with the given client configuration.
Configuration dictionary specifying Zenoh clients and their parameters
agent_dict (Optional[dict])
Optional dictionary of agent-specific parameters. Defaults to None.
create_clients
ZenohAgent.create_clients(client_config: dict, agent_config: Optional[dict] = None)
Create Zenoh clients based on configuration.
Dictionary of client configurations
agent_config (Optional[dict])
Optional dictionary of agent parameters
getForce
ZenohAgent.getForce(name: str = '') -> Force
Get force from named wrench client.
getTorque
ZenohAgent.getTorque(name: str = '') -> Torque
Get torque from named wrench client.
getImage
ZenohAgent.getImage(camera_name: str = '', image_type: Optional[str] = '') -> Image
Get image from named image client.
image_type (Optional[str])
Type of image (“rgb” or “depth”). Defaults to “rgb”.
If client is not an ImageClient
getPosition
ZenohAgent.getPosition(name: str = 'robot_pose') -> Optional[Position]
Get position from named pose client.
If client is not a PoseClient
getOrientation
ZenohAgent.getOrientation(name: str = 'robot_pose') -> Orientation
Get orientation from named pose client.
Orientation of agent as a quaternion
If client is not a PoseClient
sendVelocity
ZenohAgent.sendVelocity(linear_vel: Velocity, angular_vel: Velocity, name: str = 'cmd_vel') -> None
Send velocity command to named velocity client.
Linear velocity components
Angular velocity components
If client is not a VelocityClient
If client is not in talker mode
sendPose
ZenohAgent.sendPose(position: Position, orientation: Optional[Orientation] = None, name: str = 'cmd_delta_pose') -> None
Send pose command to named pose client.
orientation (Optional[Orientation])
Target orientation (defaults to [0,0,0,1] if None)
If client is not a PoseClient
If client is not in talker mode
publishMsg
ZenohAgent.publishMsg(msg: dict, name: str) -> None
Publish a message to a named generic client.
Name of the generic client
getMsg
ZenohAgent.getMsg(name: str) -> dict
Get a message from a named generic client.
Name of the generic client
getJointAngles
ZenohAgent.getJointAngles(name: str = 'joint_states') -> Optional[list]
Get joint angles from named joint angle client.
Name of joint angle client
If client is not a JointAngleClient
setJointAngles
ZenohAgent.setJointAngles(angles: list, blocking: bool = False, moving_time: Optional[float] = None, accel_time: Optional[float] = None, name: str = 'joint_cmd') -> None
Send joint angle command to named joint angle client.
List of target joint angles in radians
Wait for movement to complete (default False)
moving_time (Optional[float])
Time to complete the movement in seconds
accel_time (Optional[float])
Time to accelerate/decelerate in seconds
Name of joint angle client
If client is not a JointAngleClient
If client is not in talker mode
getJointVelocities
ZenohAgent.getJointVelocities(name: str = 'joint_states') -> Optional[list]
Get joint velocities from named joint angle client.
Name of joint angle client
getJointStates
ZenohAgent.getJointStates(name: str = 'joint_states') -> Optional[dict]
Get complete joint states from named joint angle client.
Name of joint angle client
If client is not a JointAngleClient
getObjectPose
ZenohAgent.getObjectPose(name: str = 'get_object_pose') -> Optional[Tuple[Position, Orientation]]
No docstring provided.
returns
Optional[Tuple[Position, Orientation]]
setObjectPose
ZenohAgent.setObjectPose(position: Position, orientation: Optional[Orientation] = None, name: str = 'set_object_pose') -> None
No docstring provided.
orientation (Optional[Orientation])
No description provided.
run
Run all Zenoh clients
stop
Stop all clients and close Zenoh session
prompt
No docstring provided.
reset
ZenohAgent.reset(name: str = 'reset')
No docstring provided.