android ros传输std_msgs/Int8MultiArray类型信息

//初始化电源管理

this.app_mcu = var1.newPublisher("app_mcu", "std_msgs/Int8MultiArray");

this.app_mcu_msg = this.app_mcu.newMessage();

ChannelBuffer buffer = app_mcu_msg.getData();

buffer.writeByte(0);//下标0

buffer.writeByte(0);//下标1

this.app_mcu_msg.setData(buffer);

//更改值并发布

this.app_mcu_msg.getData().setByte(0,zhgd);

this.app_mcu_msg.getData().setByte(1,warning_light);

this.app_mcu.publish(app_mcu_msg);

你可能感兴趣的:(Android,android,java,ros)