自定义消息类型:hdw_driver/update_file_msg
string motor_board_file_name
string power_board_file_name
string sensor_board_file_name
string imu_board_file_name
bool update_motor_board
bool update_power_board
bool update_sensor_board
bool update_imu_board
想给该消息类型数据提供值为:
motor_board_file_name: A
power_board_file_name: B
sensor_board_file_name: C
imu_board_file_name: D
update_motor_board: True
update_power_board: True
update_sensor_board: True
update_imu_board: True
则在终端执行
rostopic pub -1 /hdw_update hdw_driver/update_file_msg A B C D 1 1 1 1
语法:pub <topic-name> <topic-type> [data...]
给每一个消息元素赋值,中间用“空格”隔开,0为false 非0为true
查看该消息类型的topic数据:rostopic echo /hdw_update:
motor_board_file_name: A
power_board_file_name: B
sensor_board_file_name: C
imu_board_file_name: D
update_motor_board: True
update_power_board: True
update_sensor_board: True
update_imu_board: True
---