bug: issue when initializing with initial state
Opened this issue · 0 comments
Summary
Hey @Chris-Bee, as discussed when initializing, the ros wrappers do not wait for the initial states to be set through the first sensor measurement, although they already include a code to set the inital states p_wi_init_
and q_wi_init_
:
mars_ros/src/mars_wrapper_pose.cpp
Lines 260 to 267 in 1cf5e93
Detailed Information
The following core init call does not wait for the do_state_init_
to be set to true
mars_ros/src/mars_wrapper_pose.cpp
Line 170 in dacc3c5
Instead, the line should look like
- if (!core_logic_.core_is_initialized_ )
+ if (!core_logic_.core_is_initialized_ && do_state_init_)
This can yield the issue of the first couple of published states being wrong due to the filter converging after initializing its core state to identity (0 in position, and unit quaternion in orientation).
This issue can also apply to other wrappers and is especially present if the pose sensor provides updates significantly different from the identity/origin.