iCub-main
constantTimePositionService

A simple service that allows you to send constant time position commands to any of the robot ports. More...

+ Collaboration diagram for constantTimePositionService:

A simple service that allows you to send constant time position commands to any of the robot ports.

Description

Sit silently and waits for incoming commands. Receive position commands requests and sends position commands, but it computes the reference speeds so that commands are all executed in the same time irrespectively of the current position (the service reads the current encoders and compute the reference speed accordingly).

Ports and Messages

Here {part} is replaced with the robot part (see –part parameter)

ctpservice is a default value that can be replaced with –name.

Incoming commands are the following:

[ctpn] [time] TIME(seconds) [off] j [pos] list

Execute command. Command will take TIME seconds, the list of position will be sent to the motors starting from offset j.

or

[ctpq] [time] TIME (seconds) [off] j [pos] list

Queue commands for execution. Command will take TIME seconds, the list of position will be sent to the motors starting from offset j

or

[ctpf] filename (in yarpdatadumper format)

Example: This requires 1 second movement of joints 5,6,7 to 10 10 10 respectively: [ctpn] [time] 1 [off] 5 [pos] (10 10 10)

Parameters

Run as:

ctpService –robot robotname –part part (optionally: –name modulename)

robot: name of robot (e.g. icub)

part: prefix for part name (e.g. right_arm)

name: module name (used to form port names)

Libraries

Tested OS

Windows, Linux

Copyright (C) 2010 RobotCub Consortium

CopyPolicy: Released under the terms of the GNU GPL v2.0.

Author: Lorenzo Natale