Px4-autopilot: xformV declaration in gazebo_usv_dynamics_plugin.cpp

Created on 5 May 2020  Â·  4Comments  Â·  Source: PX4/PX4-Autopilot

When make px4_sitl_default gazebo, declaration error happens
/home/robin/px4/1.11/Firmware/Tools/sitl_gazebo/src/gazebo_usv_dynamics_plugin.cpp:251:29: error: missing template arguments before ‘xformV’ ignition::math::Matrix4 xformV(vq); /home/robin/px4/1.11/Firmware/Tools/sitl_gazebo/src/gazebo_usv_dynamics_plugin.cpp:285:15: error: ‘xformV’ was not declared in this scope bpntW = xformV * bpnt;
Looking into gazebo_usv_dynamics_plugin.cpp, it can be seen that for gazebo version >=8.0 (my Gazebo version is 9.13.0) , the declaration is ignition::math::Matrix4 xformV(vq);, which misses template.
#if GAZEBO_MAJOR_VERSION >= 8 ignition::math::Matrix4 xformV(vq); #else ignition::math::Matrix4<double> xformV(vq); #endif
And when I deleted if-else and changed it to ignition::math::Matrix4<double> xformV(vq);, make px4_sitl_default gazebo passed. So maybe the if-else can be removed.

bug sitl

All 4 comments

Is it the same issue? I have changed a line as mentioned in this and PASSED.
https://discuss.px4.io/t/error-about-gazebo-sitl-building/12019/10

Is it the same issue? I have changed a line as mentioned in this and PASSED.
https://discuss.px4.io/t/error-about-gazebo-sitl-building/12019/10

Yes, it's the same issue. And for the method https://discuss.px4.io/t/error-about-gazebo-sitl-building/12019/10 describes, if-else is useless and it can be removed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mwiatt picture mwiatt  Â·  5Comments

bthnekn picture bthnekn  Â·  4Comments

felix-west picture felix-west  Â·  4Comments

alexcherpi picture alexcherpi  Â·  4Comments

zhanghouxin07 picture zhanghouxin07  Â·  5Comments