Auto-generated ROS API
For each of the defined tasks, a ROS API made of topics, services, and actions is automatically generated by CartesIO. This is a convenient way to integrate CartesIO inside a distributed control system, and to monitor its behavior remotely.
Note
By default, the whole ROS API resides under the namespace /cartesian
.
Task specific topics/services/actions will be under the additional namespace
given by the task name.
The ROS API of a task with name mytask
will be available under the namespace
/cartesian/mytask
Contents:
Solver API
The following services and topics are available to monitor and customize the solver state.
Services
get_task_list
Returns the list of all defined tasks, with their names and types.
reset_world
TBD
load_controller
TBD
Common task API
All task types inherit a common Task ROS API, made of services and topics, as described below.
Services
get_task_properties
Returns all task properties.
Name |
get_task_properties |
---|---|
Type |
|
Request |
– |
Response |
string name
string[] type
float32 lambda
float32 lambda2
string activation_state
float32[] weight
uint32[] indices
uint32 size
string[] disabled_joints
|
Note
The type hierarchy of the C++ task representation is reflected into a list of types.
For instance, the C++ InteractionTask
class derives
from CartesianTask
, which in turns derives from TaskDescription
.
Therefore, the type field will be type = [Interaction, Cartesian, Task]
.
set_active
Activates/deactivates the task. Returns a success flag and a status message.
Name |
set_active |
---|---|
Type |
|
Request |
bool activation_state
|
Response |
bool success
string message
|
set_lambda and set_lambda2
Sets the task lambda value. Returns a success flag and a status message.
Name |
set_lambda |
---|---|
Type |
|
Request |
float32 lambda
|
Response |
bool success
string message
|
set_weight
Sets the task weight value. Returns a success flag and a status message. The weight can be expressed as:
a scalar
a vector specifying the weight as a diagonal matrix
the full weight matrix
Name |
set_weight |
---|---|
Type |
|
Request |
float32[] weight
|
Response |
bool success
string message
|
Topics
task_changed_event
A message is published on this topic whenever a task property has changed. The message contains a string identifier of the actual property changed.
Name |
set_weight |
---|---|
Type |
|