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.
JointAngleClient
Inherits from: ZenohClient
A Zenoh client for handling joint state messages.
This class inherits from ZenohClient and provides functionality for publishing and
receiving joint state messages over Zenoh topics using sensor_msgs/JointState.
Attributes:
joint_names (list): Names of the joints
joint_positions (numpy.ndarray): Current joint positions (angles)
joint_velocities (numpy.ndarray): Current joint velocities
joint_efforts (numpy.ndarray): Current joint efforts/torques
Inherited methods
- From
ZenohClient: getLatestMessage, msg_cb, run, publish, stop
init
JointAngleClient.__init__(client_dict, agent_dict = None, shared_session = None)
Initialize the joint angle client.
Configuration dictionary for the client
agent_dict (dict, optional)
Dictionary of agent parameters. Defaults to None.
Optional shared Zenoh session. Defaults to None.
publish_joint_state
JointAngleClient.publish_joint_state(joint_names: List[str], joint_positions: List[float], joint_velocities: Optional[List[float]] = None, joint_efforts: Optional[List[float]] = None)
Publish a joint state message.
joint_positions (List[float])
Joint positions/angles
joint_velocities (Optional[List[float]])
Joint velocities. Defaults to None.
joint_efforts (Optional[List[float]])
Joint efforts/torques. Defaults to None.
get_joint_state
JointAngleClient.get_joint_state() -> Optional[tuple]
Get the latest joint state message.
(joint_names, joint_positions, joint_velocities, joint_efforts) or None
process_latest_msg
JointAngleClient.process_latest_msg()
Process the latest received joint state message.
Gets the latest message and updates the stored joint states. If an agent is
connected, calls setJointAngles with the new positions.
get_joint_names
JointAngleClient.get_joint_names()
Get the current joint names.
get_joint_positions
JointAngleClient.get_joint_positions()
Get the current joint positions.
Current joint positions/angles
get_joint_velocities
JointAngleClient.get_joint_velocities()
Get the current joint velocities.
get_joint_efforts
JointAngleClient.get_joint_efforts()
Get the current joint efforts.
Current joint efforts/torques
publish_agent_joint_state
JointAngleClient.publish_agent_joint_state()
Publish the current joint state of the connected agent.