User Manual

- 26 -
Add it to the new created distance.msg message file, as below:
Find the code part as below
Modify it as below:
Then CMakeLists.txt configuration is completed, save and quit
3Check new created msg messageenter rosmsg show distance in terminalas below
2
Create ROS service srv
(1) In the created package, create a service srv directory to store the srv file. In the terminal, type
cd ~/HPS3D_SDK_ROS_Demo/src/hps_camera/, go to the package directory; enter mkdir srv,
create the srv directory; type sudo gedit srv/camera.srv, create the camera.srv file, and enter the
following code, as shown below:
string client_node_name
---
string control_cmd
Note
string client_node_nameis requestThe name of the storage client node is sent to the
server, "---" is to separate the request and response, "string control_cmd" is the response, the
control command sent by the storage server to the client.
2Enter sudo gedit CMakeLists.txt in terminalconfigure CMakeLists.txtfind corresponding