RosClient
- class compas_rrc.RosClient[source]
Bases:
Ros
,ClientInterface
Interface to use ROS as backend via the rosbridge.
The connection is managed by
roslibpy
.RosClient
is a context manager type, so it’s best used in combination with thewith
statement to ensure resource deallocation.- Parameters:
- host
str
ROS bridge host. Defaults to
localhost
.- port
int
Port of the ROS Bridge. Defaults to
9090
.- is_secure
bool
True
to indicate it should use a secure web socket, otherwiseFalse
.- planner_backend: str
Name of the planner backend plugin to use. The plugin must be a sub-class of
compas_fab.backends.PlannerInterface
. Defaults to"moveit"
, making use ofcompas_fab.backends.MoveItPlanner
.
- host
Notes
For more examples, check out the ROS examples page.
Examples
>>> from compas_fab.backends import RosClient >>> with RosClient() as client: ... print('Connected: %s' % client.is_connected) Connected: True
Methods
Execute a joint trajectory via the MoveIt infrastructure.
Follow the joint trajectory as computed by MoveIt planner.
Load an entire robot instance -including model and semantics- directly from ROS.
Inherited Methods
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Sends an authorization request to the server.
Call the given function from a thread, and wait for the result synchronously for as long as the timeout will allow.
Send a service request to ROS once the connection is established.
Call the given function in a thread.
Call the given function after a certain period of time has passed.
Send a blocking service request to ROS once the connection is established, waiting for the result to be return.
Disconnect from ROS.
Connect to ROS.
Delete parameter from the ROS Parameter Server.
Trigger a named event.
Forwards call to appropriate method in the planner.
Retrieve list of action servers in ROS.
Retrieve details of a message type in ROS.
Retrieve list subscribed topics, publishing topics and services of a specific node name.
Retrieve list of active node names in ROS.
Get the value of a parameter from the ROS Parameter Server.
Retrieve list of param names from the ROS Parameter Server.
Forwards call to appropriate method in the planner.
Get the callback which, when called, sends the service request.
Retrieve details of a ROS Service Request.
Retrieve details of a ROS Service Response.
Retrieve the type of a service in ROS.
Retrieve list of active service names in ROS.
Retrieve list of services in ROS matching the specified type.
Retrieve the current ROS time.
Retrieve the type of a topic in ROS.
Retrieve list of topics in ROS.
Retrieve list of topics in ROS matching the specified type.
Forwards call to appropriate method in the planner.
Remove a callback from an arbitrary named event.
Add a callback to an arbitrary named event.
Add a callback to be executed when the connection is established.
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Forwards call to appropriate method in the planner.
Kick-starts a non-blocking event loop.
Kick-starts a blocking loop to wait for events.
Send message to ROS once the connection is established.
Set the value of a parameter from the ROS Parameter Server.
Signals the termination of the main event loop.