## Calling actions on ROS nodes ROS distinguishes between Services and Actions. While a Service is more like a remote procedure call, an Action is something that can be triggered to run and do something for a limited time, while sending regular status updates. In VEROSIM however, the interface to Actions is very similar to the interface to Services. Both can be called, and both return a result when finished. Both should not be used directly except for the ActionBlock abstraction. The ReconCell ecosystem established a number of Actions that mostly deal with robot movements. For example, an Action is triggered to move a robot to a new position. ### List of Services __ClientCartLin__ This Action will move a robot to a new Cartesian pose on a linear path. __ClientCartPTP__ This Action will move a robot to a new Cartesian pose. Instead of a linear parth, the inverse kinematics for the new pose will be calculated and used as a PTP target for the robot motion. Thus, the robot performs a PTP movement. __ClientJoint__ This Action will trigger a PTP movement of a robot. Joint positions will be passed as arguments that are the targets for the motion. ### Configuration of actions The configuration of Actions is very similar to the configuration of services. The `ROS Actionserver` property must be set to an appropriate Action name. As a security measure for testing purposes, all motion Actions include a `Maximum Velocity` property that can be set to percentage of the maximum velocity of the robot. It scales the movement velocity to test trajectories before going into production. ![](ros_actionsconfig.png "") Actions should only be triggered through the ActionBlock programming paradigm even though it is possible to do so otherwise. You will therefore find further configuration options within the movement Behaviors. ### Using movement actions in Behaviors The movement Behaviors that come along with the ActionBlocks are aware of the action interface. They will therefore call the appropriate functions to operate a physical robot if necessary. To extend an Agent with a Behavior that is able to do so, please comply with the following instructions. Add a `ReconcellNetLib::BehaviorMovement` to the `Agent Behaviors` list of an agent that you intend to use for physical motion. Any other configuration of the Behavior is the same as for the simulated Behavor in `ActionBlocks::MovementBehavior`. The Behavior that you just added will automatically search for the actions to execute linear and PTP movements. Therefore, you need to add the `VSLibROSReconCell::ClientCartLin` and `VSLibROSReconCell::ClientJoint` to the extension list of the agent. ![](ros_actionsagent.png "") This Agent is now prepared to forward movement requests from an ActionBlock sequence (`ActionBlocks::MoveToPose`) to the physical robot.