how to pub array msg?
i have 2 msg, battery.msg and battery_array.msg, i want to send battery_array.msg, contain two battery.msg (two battery) how could i use command line to send it? i just can send one array with command line, could you please tell me how to send two array....
here is a sample with one battery array in command line:
rostopic pub -1 /bms_info_array drone_msg/BatteryStateArray "battery_number: 2 battery_state_array: - {temperature: 40.0, state: 80, voltage: 17.0}"
---------------------------------------------------------
1.
battery.msg
(below is msg content)
-----------------
float32 temperature
int8 state
float32 voltage
-----------------
2.
battery_array.msg
(below is msg content)
-----------------
int8 battery_number
battery[] battery_state_array
-----------------
thank you very much