ROS measurement system integration

The ROS-integration is based on rosjava. Connections to one or more running ROS systems are possible. The master uri of a ros system has to be configured as property of the measurement system configuration as follow:

<?xml version="1.0" encoding="iso-8859-1" ?>
<MeasurementProcess name="Upperlimb Measurement">
   <MeasurementSystem id="default" system="ROS" fileSuffix="r3d">
            <Property name="localhost" value=""/>
            <Property name="masteruri" value=""/>
            <TransducerUnitGroup name="vicon/RightHumerus" displayName="RightHumerus">
                <Property name="sampleRate" value="120"/>
                <TransducerUnit name="RightHumerus" displayName="RightHumerus" sampleRate="120">

This configuration is read, if in the conext menu of „MeasurementSystems“ the entry „Load configuration“ is invoked. Before, the masteruri is set to a hardcoded default value. This default value is used, if the „scan“ method is invoked before „Load Configuration“.

The XML-Element <MeasurementSystem> has the following additional properties:

Property name Description Optional
masteruri The ip adress of the ROS master. No
localhost The ip adress of the networkinterface used to connect to the ROS master. Without using it, a default value is determined automatically which can result in the wrong ip, if more than one network adapters are available. Yes

If the environment variable ROS_IP on the (remote) PC running ROS is not set it sends the name of this PC instead the IP and it can happen, that the PC running JDAQ can not resolve this name into the IP adress back again. As a workaround you can assign the IP adress to this host name in the /etc/hostname file.

The <TransducerUnitGroup>-element can have the following specific property element children:

Property name Default value values
sampleRate 500 [Hz] positive float value

The <TransducerUnit>-element has additional specific properties:

Property name Values Optional
timestampsMethod rosheader, autoarrive, autofix No

Methods to get timestamps:

Normally the ROS-messages have timestamps in it header. If this is not possible timestamps can be estimated by different methods. The default timestamp estimation method is called „autofix“. Available methods are described in the following table:

Method Description
rosheader The timestamp from the ROS-header is used.
autoarrive As an estimation the time at which a frame arrives JDAQ is used.
autofix From the configured sample rate delata_T is determined as 1/(sample rate) and this is added to the previous time(stamp) to determine the current one. This procedure assumes that no frame is lost in the pipleline. This method is used as default.

UR specific topics

Based on the FZI UR-robot-driver branch.

Topic type Description Channel name Unit Type
ur_rtde_msgs.JointTemperature Temperatures in 6 segments of an UR-robot. „URt<index>“ and „URtT“ for the timestamps °C REAL
ur_rtde_msgs.JointPosition Joint angles for 6 segments of an UR-robot. „URAngle<index>“ and „URAngleT“ for the timestamps rad REAL

Example configuration fragment:

 <TransducerUnitGroup name="ur_hardware_interface/rtde_data" displayName="UR">
            <TransducerUnit name="joint_temperatures" displayName="JointTemperatures" sampleRate="120">
                <Channel name="URt0"/>
                <Channel name="URt1"/>
                <Channel name="URt2"/>
                <Channel name="URt3"/>
                <Channel name="URt4"/>
                <Channel name="URt5"/>
                <Channel name="URtT"/>
            <TransducerUnit name="target_q" displayName="JointAngles" sampleRate="120">
                <Channel name="URAngle0"/>
                <Channel name="URAngle1"/>
                <Channel name="URAngle2"/>
                <Channel name="URAngle3"/>
                <Channel name="URAngle4"/>
                <Channel name="URAngle5"/>
                <Channel name="URAngleT"/>

Vicon specific topics

A Vicon markerbased motion analysis system can be integrated via ROS by usage of a „Vicon-ROS-bridge“.

Topic type Description Channel name Unit Type
geometry_msgs.TransformStamped Orientation defined by an quaternion to describe the pose of a segment „q<index>“ - REAL
geometry_msgs.TransformStamped origin defined as a vector-3d to describe the pose of a segment. „v<index>“ mm REAL

Example configuration fragment:

<?xml version="1.0" encoding="UTF-8"?>
<MeasurementProcess name="Calibration Measurements">
 <MeasurementSystem id="default" system="ROS" fileSuffix="r3d">
        <Property name="sampleRate" value="120.0"/>
        <TransducerUnitGroup name="vicon/TCP" displayName="TCP">   
            <TransducerUnit name="TCP" displayName="TCP">
                <Channel name="q0"/>
                <Channel name="q1"/>
                <Channel name="q2"/>
                <Channel name="q3"/>
                <Channel name="v0"/>
                <Channel name="v1"/>
                <Channel name="v2"/>
        <TransducerUnitGroup name="vicon/markers" displayName="Markers">   
            <TransducerUnit name="GLOBE1" displayName="GLOBE1">
                <Channel name="v0"/>
                <Channel name="v1"/>
                <Channel name="v2"/>
                <Channel name="T"/>


The BLAZE model of media type includes 33 positions. The coordinates of these positions are defined relativ to the pelvis center of the BLAZE model but given in a coordinate system of the camera with x,y-axes in the picture plane of the camera and z upright to this plane. All coordinates are given in the unit [m].

A second set of positions called global positions are determined from the mediapipe raw data as follows: The left corner of the camera defines the origin of a coordinate system. x,y-coordinate given as values between 0 and 1 if the positions are seen from the camera are scales using the hight/width of the camera sensor in pixel.

Mediapipe specific topics and types

Topic Type Topic Description Unit
geometry_msgs.PoseArray /mediapipe_poses/BLAZE All positions of the Blazepose model. mm

Example configuration fragment:

<MeasurementProcess name="Ergobot Measurement">
    <!-- Proprietaere Properties muessen als Property-Element eingefuegt werden -->
    <MeasurementSystem id="default" system="ROS" fileSuffix="r3d">
        <Property name="localhost" value=""/>
        <Property name="masteruri" value=""/>
        <TransducerUnitGroup name="mediapipe_poses" displayName="Mediapipe">
            <TransducerUnit name="BLAZE" displayName="Blaze" sampleRate="10">
                <Property name="timestampsMethod" value="rosheader"/>
                <Channel name="nose_X"/>
                <Channel name="nose_Y"/>
                <Channel name="nose_Z"/>
                <Channel name="left_eye_inner_X"/>
                <Channel name="left_eye_inner_Y"/>
                <Channel name="left_eye_inner_Z"/>
                <Channel name="left_eye_X"/>
                <Channel name="left_eye_Y"/>
                <Channel name="left_eye_Z"/>
                <Channel name="left_eye_outer_X"/>
                <Channel name="left_eye_outer_Y"/>
                <Channel name="left_eye_outer_Z"/>
                <Channel name="right_eye_inner_X"/>
                <Channel name="right_eye_inner_Y"/>
                <Channel name="right_eye_inner_Z"/>
                <Channel name="right_eye_X"/>
                <Channel name="right_eye_Y"/>
                <Channel name="right_eye_Z"/>
                <Channel name="right_eye_outer_X"/>
                <Channel name="right_eye_outer_Y"/>
                <Channel name="right_eye_outer_Z"/>
                <Channel name="left_ear_X"/>
                <Channel name="left_ear_Y"/>
                <Channel name="left_ear_Z"/>
                <Channel name="right_ear_X"/>
                <Channel name="right_ear_Y"/>
                <Channel name="right_ear_Z"/>
                <Channel name="mouth_left_X"/>
                <Channel name="mouth_left_Y"/>
                <Channel name="moutn_left_Z"/>
                <Channel name="mouth_right_X"/>
                <Channel name="mouth_right_Y"/>
                <Channel name="moutn_right_Z"/>
                <Channel name="left_shoulder_X"/>
                <Channel name="left_shoulder_Y"/>
                <Channel name="left_shoulder_Z"/>
                <Channel name="right_shoulder_X"/>
                <Channel name="right_shoulder_Y"/>
                <Channel name="right_shoulder_Z"/>
                <Channel name="left_elbow_X"/>
                <Channel name="left_elbow_Y"/>
                <Channel name="left_elbow_Z"/>
                <Channel name="right_elbow_X"/>
                <Channel name="right_elbow_Y"/>
                <Channel name="right_elbow_Z"/>
                <Channel name="left_wrist_X"/>
                <Channel name="left_wrist_Y"/>
                <Channel name="left_wrist_Z"/>
                <Channel name="right_wrist_X"/>
                <Channel name="right_wrist_Y"/>
                <Channel name="right_wrist_Z"/>
                <Channel name="left_pinky_X"/>
                <Channel name="left_pinky_Y"/>
                <Channel name="left_pinky_Z"/>
                <Channel name="right_pinky_X"/>
                <Channel name="right_pinky_Y"/>
                <Channel name="right_pinky_Z"/>
                <Channel name="left_index_X"/>
                <Channel name="left_index_Y"/>
                <Channel name="left_index_Z"/>
                <Channel name="right_index_X"/>
                <Channel name="right_index_Y"/>
                <Channel name="right_index_Z"/>
                <Channel name="left_thumb_X"/>
                <Channel name="left_thumb_Y"/>
                <Channel name="left_thumb_Z"/>
                <Channel name="right_thumb_X"/>
                <Channel name="right_thumb_Y"/>
                <Channel name="right_thumb_Z"/>
                <Channel name="left_hip_X"/>
                <Channel name="left_hip_Y"/>
                <Channel name="left_hip_Z"/>
                <Channel name="right_hip_X"/>
                <Channel name="right_hip_Y"/>
                <Channel name="right_hip_Z"/>
                <Channel name="left_knee_X"/>
                <Channel name="left_knee_Y"/>
                <Channel name="left_knee_Z"/>
                <Channel name="right_knee_X"/>
                <Channel name="right_knee_Y"/>
                <Channel name="right_knee_Z"/>
                <Channel name="left_ankle_X"/>
                <Channel name="left_ankle_Y"/>
                <Channel name="left_ankle_Z"/>
                <Channel name="right_ankle_X"/>
                <Channel name="right_ankle_Y"/>
                <Channel name="right_ankle_Z"/>
                <Channel name="left_heel_X"/>
                <Channel name="left_heel_Y"/>
                <Channel name="left_heel_Z"/>
                <Channel name="right_heel_X"/>
                <Channel name="right_heel_Y"/>
                <Channel name="right_heel_Z"/>
                <Channel name="left_foot_index_X"/>
                <Channel name="left_foot_index_Y"/>
                <Channel name="left_foot_index_Z"/>
                <Channel name="right_foot_index_X"/>
                <Channel name="right_foot_index_Y"/>
                <Channel name="right_foot_index_Z"/>
                <Channel name="T"/>
<code xml>

How to add unknown topics?

If the message type of the topic is known, integration works with the following steps:

integration/ros.txt · Zuletzt geändert: 2022/07/25 09:54 von oliver

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki