ROS 2.0 basics

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

H-ROS modular grippers makes use of HRIM, capturing relevant information to improve the user experience and ensure a correct operation of the whole robotic system:

  • ID.srv 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.srv and SimulationURDF.srv that sends the device 3D model and related information.
  • Specs.srv is a custom message which reports the main features of the device.
  • StateCommunication.msg is a custom message which reports the state of the device network.
  • SpecsCommunication.srv is a custom message which reports the specs of the device network.
  • SpecsFingerGripper.srv shows the specification of the gripper.

The following table shows more information about the topics:

Topic Name Rate Pub/Sub
power /hros_actuation_gripper_000000000004/power 1 Hz Pub
state comm /hros_actuation_gripper_000000000004/state_comm 1 Hz Pub
state_finger_gripper /hros_actuation_gripper_000000000004/state_finger_gripper 10 Hz Pub
state_gripper /hros_actuation_gripper_000000000004/state_gripper 10 Hz Pub
status /hros_actuation_gripper_000000000004/status 1 Hz Pub

The following table shows more information about the services:

Service Name
goal /hros_actuation_gripper_000000000004/goal
id /hros_actuation_gripper_000000000004/id
 module_3d /hros_actuation_gripper_000000000004/module_3d
 module_urdf /hros_actuation_gripper_000000000004/module_urdf
specs /hros_actuation_gripper_000000000004/specs
specs comm /hros_actuation_gripper_000000000004/specs_comm

To visualize the topic, you need to type ros2 topic echo /hros_actuation_gripper_000000000004/power

header:
 stamp:
   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_gripper_000000000004/status

header:
 stamp:
   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

We can check which is the state of the gripper typing: ros2 topic echo /robotiq_140_gripper/state_gripper:

header:
 stamp:
   sec: 422
   nanosec: 309000000
 frame_id: ''
on_off: true

We can check the state of the fingers using the following command ros2 topic echo /robotiq_140_gripper/state_finger_gripper:

header:
 stamp:
   sec: 347
   nanosec: 45000000
 frame_id: ''
angular_position: -5.826991333890419e-09
linear_position: 0.0

The communication state topic gives us information about the network conditions using the message SpecsCommunication.msg. To visualize the information about this topic in the terminal, you need to type ros2 topic echo /robotiq_140_gripper/state_comm:

header:
 stamp:
   sec: 472
   nanosec: 986000000
 frame_id: ''
comm_rate: 0.0
size_msgs: 0.0

To check the ID information, you need to type ros2 service call /hros_actuation_gripper_000000000004/id hrim_generic_srvs/ID {}

response:
hrim_generic_srvs.srv.ID_Response(device_kind_id=2, device_name='', vendor_id=0, product_id=0, instance_id=0, hrim_version='Anboto', hros_version='Ardent')

To check the specifications of the gripper you need to call the following service ros2 service call /robotiq_140_gripper/specs hrim_actuator_gripper_srvs/SpecsFingerGripper {}:

requester: making request: hrim_actuator_gripper_srvs.srv.SpecsFingerGripper_Request()

response:
hrim_actuator_gripper_srvs.srv.SpecsFingerGripper_Response(min_force=10.0, max_force=125.0, max_payload=125.0, min_speed=30.0, max_speed=250.0, max_acceleration=0.0, max_length=209.0, max_angle=0.8700000047683716, repeatability=0.07999999821186066)

To check the specifications of the communication channel you need to call the following service ros2 service call /robotiq_140_gripper/specs_comm hrim_generic_srvs/SpecsCommunication {}:

requester: making request: hrim_generic_srvs.srv.SpecsCommunication_Request()

response:
hrim_generic_srvs.srv.SpecsCommunication_Response(min_comm_rate=0.0, max_comm_rate=0.0, max_size_msgs=0.0)

To set a goal you need to type ros2 service call /robotiq_140_gripper/goal hrim_actuator_gripper_srvs/ControlFinger "{goal_angularposition: 0.5}":

requester: making request: hrim_actuator_gripper_srvs.srv.ControlFinger_Request(goal_linearposition=0.0, goal_angularposition=0.5, goal_effort=0.0, goal_velocity=0.0, goal_acceleration=0.0)

response:
hrim_actuator_gripper_srvs.srv.ControlFinger_Response(goal_accepted=True)