VelocityClient

Inherits from: ROSClient A ROS client for handling velocity messages. This class inherits from ROSClient and provides functionality for publishing and receiving velocity messages over ROS topics.

VelocityClient

VelocityClient(client_dict, agent_dict)
Initialize the velocity client.
Arguments
client_dict (dict)
required
Configuration dictionary for the client
agent_dict (dict), optional
defaults to None. Dictionary of agent parameters. Defaults to None.

publish_velocity

VelocityClient.publish_velocity(linear_velocity, angular_velocity)
Publish a velocity message.
Arguments
linear_velocity (array-like)
required
Linear velocity as [x, y, z]
angular_velocity (array-like)
required
Angular velocity as [x, y, z]

process_latest_msg

VelocityClient.process_latest_msg()
Process the latest received velocity message. Gets the latest message and updates the stored velocities. If an agent is connected, calls moveByVelocity with the new velocities.
Returns

get_linear_velocity

VelocityClient.get_linear_velocity()
Get the current linear velocity.
Returns
Current linear velocity as [x, y, z]

get_angular_velocity

VelocityClient.get_angular_velocity()
Get the current angular velocity.
Returns
Current angular velocity as [x, y, z]