Closed elpimous closed 1 year ago
Small up friends. could it be a Thread problem ? So, waiting for any help, working on a service, to call imu into read() function !
Up please, friends.. my imu callback is into the class class legged::UnitreeHW Just after the UnitreeHW::init() run, the callback value isn't actualized !!
Please help, all !!
Up, please !
well, found, with GPT4 help ! needed to use a specific subscriber : https://github.com/elpimous/Legged_Control/blob/e0a6560fb057e1ba9ec215c66dacd934c2091aa1/legged_unitree/legged_unitree_hw/src/legged_unitree_hw.cpp#L66
Hi, my imu subscriber is into UnitreeHW.pp -> init()
ros::Subscriber sub = root_nh.subscribe("imu/data", 1000, &UnitreeHW::imuCallback, this);
The imu callback is :
But, when leaving init() function, imuData_ isn't actualized and keep last value !!
here is my package : https://github.com/elpimous/Legged_Control/blob/c5cad9608556c21835cd147e952fdd2afb53a0d6/legged_unitree/legged_unitree_hw/src/UnitreeHW.cpp#L57
Don't find the problem !! Any help ?