ROS 2.0 basics

NOTE: Work in progress. We're continuously improving the documentation, stay tuned for updates

MARA makes use of HRIM, capturing relevant information to improve the user experience and ensure a correct operation of the whole robotic system. Six of the available topics are generic messages such as:

  • ID.msg which publishes the general identity of the component.
  • Power.msg that publishes the power consumption.
  • Status.msg which inform about the resources that are consumed, SpecsCommunication.msg and StateCommunication.msg that are created to inform about communication aspects.
  • Simulation3D.msg and SimulationURDF.msg.msg that sends the device 3D model and related information.
  • Specs.msg is a custom message which reports the main features of the device.

Remember that the naming convention is for:

  • nodes hrim_<device_kind>_<device_name>_<instance_id>
  • topic /hrim_<device_kind>_<device_name>_<instance_id>/<topic_name>.

To visualize the nodes that are running in the ROS 2.0 network in the terminal, you should run ros2 node list:


To visualize the topics that are been exposed by MARA, you should run ros2 topic list. Then, you will see the following topics:


To visualize the topic, you need to type ros2 topic echo /hros_actuation_servomotor_000000000001/ID

    sec: 1222
    nanosec: 544000000
  frame_id: ''
device_kind_id: 1
device_name: ''
vendor_id: 0
product_id: 0
instance_id: 0
hrim_version: Anboto
hros_version: Ardent

To visualize the topic, you need to type ros2 topic echo /hros_actuation_servomotor_000000000001/Power

    sec: 1277
    nanosec: 848000000
  frame_id: ''
voltage: 48.0
current_consumption: 0.10000000149011612
current_surplus: 0.0
power_consumption: 4.800000190734863
power_surplus: 0.0

To visualize the topic, you need to type ros2 topic echo /hros_actuation_servomotor_000000000001/Status

    sec: 1326
    nanosec: 580000000
  frame_id: ''
instance_id: 0
system_cpu: 0.0
core_temperature: 0.0
system_ram_total: 0
system_ram_used: 0
system_ram_free: 0
system_io_in: 0.0
system_io_out: 0.0
system_ipv4_received: 0.0
system_ipv4_sent: 0.0
ipv4_tcpsock: 0
ipv4_tcppackets_received: 0.0
ipv4_tcppackets_sent: 0.0
ipv4_tcp_errors: 0.0
ipv4_udppackets_received: 0.0
ipv4_udppackets_sent: 0.0
ipv4_udp_errors: 0.0
cpu_interrupts: 0.0
cpu_context_switches: 0.0
softnet_processed: 0
softnet_dropped: 0
softnet_squeezed: 0
softnet_received_rps: 0
softnet_flow_limit_count: 0
softirqs_hi: 0
softirqs_timer: 0
softirqs_net_tx: 0
softirqs_net_rx: 0
softirqs_block: 0
softirqs_irq_poll: 0
softirqs_tasklet: 0
softirqs_sched: 0
softirqs_hrtimer: 0
softirqs_rcu: 0
load1: 0.0
load5: 0.0
load15: 0.0

This topic shows the device features using the message SpecsRotaryServo.msg. To visualize the information in the terminal type: ros2 topic echo /hros_actuation_servomotor_000000000001/Specs

    sec: 1536341182
    nanosec: 560247777
  frame_id: ''
control_type: 4
range_min: -12.56
range_max: 12.56
precision: 8.722222e-05
rated_speed: 1.46607657
reachable_speed: 1.46607657
rated_torque: 9.0
reachable_torque: 13.0
temperature_range_min: -10.0
temperature_range_max: 50.0

This topic controls the position, velocity or/and effort by using the message GoalRotaryServo.msg. To visualize the topic in the terminal, just type: ros2 topic echo /hros_actuation_servomotor_000000000001/command

    sec: 0
    nanosec: 0
  frame_id: ''
control_type: 1
position: 0.05236
velocity: 0.08726666867733002
effort: 0.0

The state topic gives us information about the motor conditions and the causes in case of error by using the message StateRotaryServo. To visualize the information about this topic in the terminal, you need to type ros2 topic echo /hros_actuation_servomotor_000000000001/state:

    sec: 2198
    nanosec: 553000000
  frame_id: ''
goal: 0.0
position: -1.2887455911325674e-06
error: 1.2887455911325674e-06
velocity: -2.501547525126175e-07
effort: 0.0
load: 0.0
moving: false
fault: 0
control_type: 0