深圳市璞数技术有限公司
PAGE 15 OF 15
Appendix A: ROS Topics of YZ robot diver node
1. Firstly, launch robot diver node:
roslaunch stm32_connect start_basecontrol.launch
2. Topics of robot diver node
2.1.
Topic name:
“
Auto_Charging
”
, function: to enable or disable auto-charging flag
Topic value: auto_charging_flag = 0: Disable = 1:Enable
【
Example
】
:
in a terminal , input following text:
rostopic pub /Auto_Charging robot_msgs/Charging_Control “auto_charging_flag:1”
Above instruction will let robot go to charging dock automatic
2.2.
Topic name
:
”
PMS_get_status
”
, check battery power level and status
Topic value: pms_charging_flag = 0: now not charging = 1: now charging
Pms_battary_level = n : means battery power level is n% remain
【
Example
】
:
in a terminal , input following text:
rostopic echo /PMS_get_status
Above instruction will display battery status and remain capacity level
2.3.
Topic name
:
”
Ultrasound_result
”
, check ultrasonic obstacle sensor trigger status
Topic value: cs_obs = 0
:
none obstacle =1
:
front obstacle
=16
:
rear obstacle =17
:
front and rear obstacles
【
Example
】
:
in a terminal , input following text:
rostopic echo /Ultrasound_result
Above instruction will display ultrasonic obstacle sensor status
2.4.
Topic name
:
”Wheel_Switch”
,
check emergency switch status
Topic value: Switch = 0
:
Pushed(Enable) =1
:
Release(Disable)
【
Example
】
:
in a terminal , input following text:
rostopic echo /Wheel_Switch
Above instruction will display emergency switch status
2.5.
Topic name
:
”
cmd_vel
”
, check or set the linear/angular velocity
【
Example
】
:
in a terminal , input following text:
rostopic pub /cmd_vel geometry_msgs/Twist “linear
:
x:0.3 y:0.0 z:0.0 angular: x:0.0 y:0.0 z:0.1”
This will let robot run at 0.3m/s linear and 0.1r/s angular velocity
2.6.
Topic name
:
”
odom
”
,
check odometry data
【
Example
】
:
in a terminal , input following text:
rostopic echo /odom
Above instruction will display odometer data