Level2_Robot/room_seeker_core/src/room_seeker_level1.cpp
//================================================================================================//
// Publish msgs (Magnetic data)                                                                   //
//================================================================================================//
Publish msgs (Magnetic data)
Publish msgs ( Magnetic data )
void RoomSeekerLevel1::publishMagMsg(void){
  sensor_msgs::MagneticField mag_msg;
  mag_msg.header.stamp    = ros::Time::now();
  mag_msg.header.frame_id = mag_frame_id;
  mag_msg.magnetic_field.x = mx;
  mag_msg.magnetic_field.y = my;
  mag_msg.magnetic_field.z = mz;
  mag_pub.publish(mag_msg);
}
void RoomSeekerLevel1 :: publishMagMsg ( void ) { sensor_msgs :: MagneticField mag_msg ; mag_msg . header . stamp = ros :: Time :: now ( ) ; mag_msg . header . frame_id = mag_frame_id ; mag_msg . magnetic_field . x = mx ; mag_msg . magnetic_field . y = my ; mag_msg . magnetic_field . z = mz ; mag_pub . publish ( mag_msg ) ; }
Publish msgs (Magnetic data)
Publish msgs ( Magnetic data )