Electric motor

HRIM defines an electric motor as
A smart actuator that creates a circular movement and allows control of velocity and and direction.

So, apart from the common requirements (ID, Status, Power, Specs and Simulation, detailed in HRIM component model section), all electric motors will contain a topic referring to the circular movement.

HRIM component model: Rangefinder
URI XML MODEL ABSTRACTION CLASS
M/O
SHORT DESCRIPTION
/hrim_actuator_electricmotor_<instance_id>/id generic/id.xml topic
(Pub)
M Component identification.
/hrim_actuator_electricmotor_<instance_id>/status generic/status.xml topic
(Pub)
M How the module is working.
/hrim_actuator_electricmotor_<instance_id>/power generic/power.xml topic
(Pub)
M Describes the power supply type and give the information about the module power consumption.
/hrim_actuator_electricmotor_<instance_id>/specs_comm generic/specs_comm.xml topic
(Pub)
M Published the capabilities in term of communicaction that the component offers.
/hrim_actuator_electricmotor_<instance_id>/state_comm generic/state_comm.xml topic
(Pub)
M Published the resources that the component is using at the moment.
/hrim_actuator_electricmotor_<instance_id>/module_3d generic/module_3d.xml topic
(Pub)
M Ask for the 3D model of the HRIM component.
/hrim_actuator_electricmotor_<instance_id>/module_urdf generic/module_urdf.xml topic
(Pub)
M Ask for the information of the HRIM component's 3D model.
/hrim_actuator_electricmotor_<instance_id>/specs actuator/electricmotor/topics/specs.xml topic
(Pub)
M Device features.
/hrim_actuator_electricmotor_<instance_id>/goal actuator/electricmotor/topics/goal.xml topic
(Sub)
M Control the position, velocity or/and effort.
/hrim_actuator_electricmotor_<instance_id>/state actuator/electricmotor/topics/state.xml topic
(Pub)
M Motor condition and the reason in case of error.
/hrim_actuator_electricmotor_<instance_id>/rc actuator/electricmotor/topics/rc.xml topic
(Sub)
O Connect to remote control.
/hrim_actuator_electricmotor_<instance_id>/temperature actuator/electricmotor/topics/temperature.xml topic
(Pub)
O Motor internal temperature. Also informs if there is temperature error. The integration of a temperature sensor is needed.
/hrim_actuator_electricmotor_<instance_id>/encoder actuator/electricmotor/topics/encoder.xml topic
(Pub)
O Motor position, velocity or/and acceleration. The integration of an encoder is needed.
/hrim_actuator_electricmotor_<instance_id>/specs_encoder actuator/electricmotor/topics/specs_encoder.xml topic
(Pub)
O Encoder features. The integration of an encoder is needed.
/hrim_actuator_electricmotor_<instance_id>/reconfiguration actuator/electricmotor/topics/reconfiguration.xml topic
(Pub)
O Dynamic reconfiguration of H-ROS systems. The integration of an IMU sensor is needed.
Parameters
PARAMETER NAME DATA TYPE UNIT CLASS
M/O
SHORT DESCRIPTION
min_temperature float ºC O Related to temperature topic
Minimum operating temperature.
NOTE: Mandatory if temperature topic is added.
max_temperature float ºC O Related to temperature topic
Maximum operating temperature.
NOTE: Mandatory if temperature topic is added.

Note: the {BASE} wildcard references the base topics all modules contain, defined in the HRIM component model page.

The XML notation would look like:

<?xml version="1.0"?>
<module name="electricmotor" type="actuator" description="defines the messages to interact with an electric motor">
  <mandatory>

    {BASE}

    <topic name="specs" type="publish" description="device features" fileName="SpecsElectricMotor">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="motor_type" type="uint8" unit="enum" enum='{"MOTOR_DC_BRUSHED": 0, "MOTOR_DC_BRUSHLESS": 1, "MOTOR_DC_GEAREDDOWN": 2}' description="motor type">
        <value></value>
      </property>
      <property name="encoder" type="boolean" description="whether the electric motor has movement control capabilities">
        <value></value>
      </property>
      <property name="rated_power" type="float64" unit="watt">
        <value></value>
      </property>
      <property name="rated_voltage" type="float64" unit="volt">
        <value></value>
      </property>
      <property name="rated_current" type="float64" unit="ampere">
        <value></value>
      </property>
      <property name="rated_torque" type="float64" unit="newtons per metre">
        <value></value>
      </property>
      <property name="rated_speed" type="float64" unit="rpm">
        <value></value>
      </property>
      <property name="noload_current" type="float64" unit="ampere" description="current without load">
        <value></value>
      </property>
      <property name="noload_speed" type="float64" unit="rpm" description="speed without load">
        <value></value>
      </property>
      <property name="stall_torque" type="float64" unit="newtons per metre" description="torque without speed">
        <value></value>
      </property>
      <property name="temperature_range_min" type="float64" unit="celsius" description="minimum operational temperature">
        <value></value>
      </property>
      <property name="temperature_range_max" type="float64" unit="celsius" description="maximum operational temperature">
        <value></value>
      </property>
    </topic>

    <topic name="goal" type="subscribe" description="control the speed" fileName="GoalElectricMotor">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="speed" type="int32" description="negative value indicates reverse rotation">
        <value></value>
      </property>
    </topic>

    <topic name="state" type="publish" description="motor condition and the reason in case of error" fileName="StateElectricMotor">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="moving" type="boolean" description="whether the electric motor is working or not">
        <value></value>
      </property>
    </topic>

  </mandatory>
  <optional>

    <topic name="rc" type="subscribe" description="remote control" fileName="RC">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="axes" type="float32[]" description="axis measurements from a joystick">
        <value></value>
      </property>
      <property name="buttons" type="int32[]" description="buttons from a controller">
        <value></value>
      </property>
    </topic>

    <topic name="temperature" type="publish" description="motor internal temperature, also informs if there is temperature error" fileName="Temperature">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="temperature" type="float64" unit="celsius" description="current temperature">
        <value></value>
      </property>
      <property name="temperature_error" type="boolean" description="whether current temperature is outside of the component's allowed range">
        <value></value>
      </property>
    </topic>

    <topic name="encoder" type="publish" description="check the position, velocity or/and acceleration of the electric motor" fileName="Encoder">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="moving" type="boolean" description="whether the motor is currently in motion">
        <value></value>
      </property>
      <property name="encoder" type="uint8">
        <value></value>
      </property>
      <property name="encoder_type" type="uint8">
        <value></value>
      </property>
      <property name="encoder_output" type="uint8">
        <value></value>
      </property>
      <property name="goal_position" type="int32" unit="radian" description="commanded position">
        <value></value>
      </property>
      <property name="current_position" type="int32" unit="radian" description="current position">
        <value></value>
      </property>
      <property name="error_position" type="int32" unit="radian" description="difference between current and goal positions">
        <value></value>
      </property>
      <property name="goal_speed" type="int32" unit="rpm" description="commanded position">
        <value></value>
      </property>
      <property name="current_speed" type="int32" unit="rpm" description="current position">
        <value></value>
      </property>
      <property name="error_speed" type="int32" unit="rpm" description="difference between current and goal speed">
        <value></value>
      </property>
      <property name="goal_acceleration" type="int32" unit="rpm squared" description="commanded position">
        <value></value>
      </property>
      <property name="current_acceleration" type="int32" unit="rpm squared" description="current position">
        <value></value>
      </property>
      <property name="error_acceleration" type="int32" unit="rpm squared" description="difference between current and goal acceleration">
        <value></value>
      </property>
    </topic>

    <topic name="specs_encoder" type="publish" description="encoder features" fileName="SpecsEncoder">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="encoder_type" type="uint8" unit="enum" enum='{"ENCODER_ROTARY" : 0, "ENCODER_LINEAR" : 1}'>
        <value></value>
      </property>
      <property name="encoder_information" type="uint8" unit="enum" enum='{"INCREMENTAL" : 0, "ABSOLUTE" : 1, "ABSOLUTE_MULTI_TURN" : 2}'>
        <value></value>
      </property>
      <property name="max_speed" type="int32" description="rotary encoder (rpm) // linear encoder (m)">
        <value></value>
      </property>
      <property name="max_torque" type="int32" unit="newtons per metre">
        <value></value>
      </property>
      <property name="resolution" type="int32" unit="ppr/metre" description="rotary encoder in pulses per revolution (PPR) // linear encoder (m)">
        <value></value>
      </property>
      <property name="accuracy" type="boolean" description="true: the pulses are identical / false: not identical pulses">
        <value></value>
      </property>
    </topic>

    <topic name="reconfiguration" type="publish" description="dynamic reconfiguration of H-ROS systems" fileName="Reconfiguration">
      <property name="header" type="header" fileName="Header">
        <property name="time" type="time" fileName="Time">
          <property name="sec" type="int32" unit="second">
            <value></value>
          </property>
          <property name="nanosec" type="uint32" unit="nanosecond">
            <value></value>
          </property>
        </property>
        <property name="frame_id" type="string" description="transform frame with which this data is associated">
          <value></value>
        </property>
      </property>
      <property name="orientation" type="quaternion" fileName="Quaternion">
        <property name="x" type="float64">
          <value></value>
        </property>
        <property name="y" type="float64">
          <value></value>
        </property>
        <property name="z" type="float64">
          <value></value>
        </property>
        <property name="w" type="float64">
          <value></value>
        </property>
      </property>
      <property name="orientation_covariance" type="float64[9]">
        <value></value>
      </property>
      <property name="angular_velocity" type="vector3" fileName="Vector3">
        <property name="x" type="float64">
          <value></value>
        </property>
        <property name="y" type="float64">
          <value></value>
        </property>
        <property name="z" type="float64">
          <value></value>
        </property>
      </property>
      <property name="angular_velocity_covariance" type="float64[9]">
        <value></value>
      </property>
      <property name="linear_acceleration" type="vector3" fileName="Vector3">
        <property name="x" type="float64">
          <value></value>
        </property>
        <property name="y" type="float64">
          <value></value>
        </property>
        <property name="z" type="float64">
          <value></value>
        </property>
      </property>
      <property name="linear_acceleration_covariance" type="float64[9]">
        <value></value>
      </property>
    </topic>

    <param name="min_temperature" type="float" unit="celsius" description="minimum operating temperature">
      <value></value>
    </param>

    <param name="max_temperature" type="float" unit="celsius" description="maximum operating temperature">
      <value></value>
    </param>

  </optional>
</module>