Actuators

A set of common actuator models is available in the Stonefish library, including the ones specific for the marine robotics. The implemented actuators can be divided into two groups: the joint actuators and the link actuators. Each actuator type is described below to understand its operation and the way to include it in the simulation scenario.

Warning

Actuators can only be created in connection with a definition of a robot, because they have to be attached to a robot’s joint or link.

Note

In the following sections, description of each specific actuator implementation is accompanied with an example of actuator instantiation through the XML syntax and the C++ code. It is assumed that the XML snippets are located inside the definition of a robot. In case of C++ code, it is assumed that an object sf::Robot* robot = new sf::Robot(...); was created before the actuator definition.

Joint actuators

The joint actuators are attached to the robot’s joints and they apply forces or torques between the links. They share a set of common properties:

  1. Name: unique string
  2. Type: type of the actuator
  3. Joint name: the name of the robot joint that the actuator is attached to
<actuator name="{1}" type="{2}">
   <!-- specific definitions here -->
   <joint name="{3}"/>
</sensor>

Servomotor

A servomotor is an electric motor connected with control and power circuits that allow for controlling it in different modes: torque, position or velocity.

<actuator name="Servo" type="servo">
    <controller position_gain="1.0" velocity_gain="0.5" max_torque="10.0"/>
    <joint name="Joint1"/>
</actuator>
#include <Stonefish/actuators/Servo.h>
sf::Servo* srv = new sf::Servo("Servo", 1.0, 0.5, 10.0);
robot->AddJointActuator(srv, "Joint1");