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

Resets the solver state to the robot state (if available) or to the homing state.

Topics

solution

The current solver solution, as a sensor_msgs/JointState message.

tf

Current solution TF tree. Tf messages are published with a TF prefix (default is ci/), to avoid conflicts with other robot state publishers.

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.

Service description

Name

get_task_properties

Type

cartesian_interface::GetTaskInfo

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.

Service description

Name

set_active

Type

cartesian_interface::SetTaskActive

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.

Service description

Name

set_lambda

Type

cartesian_interface::SetLambda

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

Service description

Name

set_weight

Type

cartesian_interface::SetWeight

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.

Topic description

Name

set_weight

Type

std_msgs::String