How to subscribe sensor_msg/Imu via rosserial_arduino
I am very new to ROS, please help. My system is ubuntu 18.04 and using ROS melodic. I am using D435i camera which have inbuilt IMU sensor and i am able to using imu_filter_madgwick to publish imu/data. i want to use ESP32 to subscribe the IMU orientation data via rosserial_ardiuno to do some servo controlling here is my code for subscriber
void imuOrientation( const sensor_msgs::Imu::_orientation_type& imu_orientation_msgs){
imu_quaternion[0]=imu_orientation_msgs.x;
imu_quaternion[1]=imu_orientation_msgs.y;
imu_quaternion[2]=imu_orientation_msgs.z;
imu_quaternion[3]=imu_orientation_msgs.w;
}
however when i run rosserial arduino. it show error
[ERROR] [1646505584.044049475]: Client [/serial_node] wants topic /imu/data to have datatype/md5sum [geometry_msgs/Quaternion/a779879fadf0160734f906b8c19c7004], but our version has [sensor_msgs/Imu/6a62c6daae103f4ff57a132d6f95cec2]. Dropping connection.
i cannot subscribe any value and nh.connect may down. what should i change?