GenericClient

Inherits from: ROSClient A generic ROS client that can handle arbitrary message types and processing functions. This class inherits from ROSClient and provides functionality for publishing and processing generic ROS messages with optional custom processing functions.
Attributes
msg
The most recently published/received message

GenericClient

GenericClient(client_dict, agent_dict)
Initialize the generic client.
For generic client, you also need to include the following keys:
  • “msg_type”: The ROS message type
  • “fn”: The function to process the message
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_msg

GenericClient.publish_msg(msg)
Publish a message to the configured topic. If a processing function is defined, it will be called before publishing.
Arguments
msg
required
The message to publish

get_msg

GenericClient.get_msg()
Get the most recent message.
Returns
The most recently published/received message