Advantech Robotic Suite/Advantech ROS2 Data Format

From ESS-WIKI
Revision as of 04:50, 30 January 2023 by Eric.liang (talk | contribs) (Created page with " <br/> = Introduction = The message definition of Advantech ROS node are located in include/adv_msgs folder, message file (.msg) is defined for node data publish/subscribe an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


= Introduction =

The message definition of Advantech ROS node are located in include/adv_msgs folder, message file (.msg) is defined for node data publish/subscribe and action file (.action) is defined for setting sensor data.

 

Message definition

AdvSensor.msg

The file AdvSensor.msg is a message definition that holds a detail hardware sensor data that Advantech device/board provided.

 
# This is a message that holds a detail hardware sensor data that Advantech device/board provided.<br/> #<br/> string    sensor    # Sensor name<br/> string    type      # Sensor type: "v", "bv" or "sv"<br/> bool      bv        # Boolean type of sensor value <br/> float64   v         # Number type of sensor value <br/> string    sv        # String type of sensor value <br/> uint64    ts        # Timestamp od sensor value<br/> 

 

Action definition

AdvSensorSet.action

The file AdvSensorSet.action' is a request/response/feedback that holds a detail hardware sensor data that Advantech device/board provided.

 

 
# This is a request/response/feedback that holds a detail hardware sensor data that Advantech device/board provided.<br/> #<br/> string    cmd       # Request command of set sensor value<br/> string    sensor    # Sensor name of set request<br/> string    type      # Sensor type: "v", "bv" or "sv"<br/> bool      bv        # Boolean type of sensor value<br/> float64   v         # Number type of sensor value<br/> string    sv        # String type of sensor value<br/> ---<br/> int16     code      # Result code, request accept: 100, unaccept: code > 100<br/> ---<br/> int16     status    # Status feedback of set sensor request<br/> string    sensor    # Sensor name feedback of set request<br/> string    info      # Information feedback of set request<br/> uint64    ts        # Timestamp of sensor value<br/> 

 

Setup message

This section will introduct you how to setup node in your environmant.

1. Sourcing ROS2 foxy environmant setup file:
$ source /opt/ros/foxy/setup.bash<br/> 

 

2. Sourcing node setup file:
$ source /usr/local/Advantech/ros/foxy/include/edge-converter-ros2/adv_msgs/install/local_setup.bash<br/>