mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
holonomic option: makeing z depending on x and pitch too if nonholonomic
This commit is contained in:
@@ -225,9 +225,16 @@ Transform Odometry::process(const SensorData & data, OdometryInfo * info)
|
||||
|
||||
if(!_force2D)
|
||||
{
|
||||
z = filters_[2]->filter(z);
|
||||
roll = filters_[3]->filter(roll);
|
||||
pitch = filters_[4]->filter(pitch);
|
||||
if(_holonomic)
|
||||
{
|
||||
z = filters_[2]->filter(z);
|
||||
}
|
||||
else
|
||||
{
|
||||
z = x * tan(pitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,6 +246,10 @@ Transform Odometry::process(const SensorData & data, OdometryInfo * info)
|
||||
else if(!_holonomic)
|
||||
{
|
||||
y = x * tan(yaw);
|
||||
if(!_force2D)
|
||||
{
|
||||
z = x * tan(pitch);
|
||||
}
|
||||
}
|
||||
UASSERT_MSG(uIsFinite(x) && uIsFinite(y) && uIsFinite(z) &&
|
||||
uIsFinite(roll) && uIsFinite(pitch) && uIsFinite(yaw),
|
||||
|
||||
Reference in New Issue
Block a user