# cannot locate LinearMath/btMatrix3x3.h

Hi,

I intend to convert quaternion into rpy using btMatrix3x3.getRPY(). However, i get the following error when i try to compile.

this is done with only #include <LinearMath/btMatrix3x3.h> included in my cpp file. /home/chao/catkin_ws/src/simple_navigation_goals/src/robot_state3_with_class.cpp:23:36: fatal error: LinearMath/btMatrix3x3.h: No such file or directory compilation terminated.

this error msg showed up when i added <depend package="LinearMath"/> into the manifest.xml

[rospack] Error: package/stack 'simple_navigation_goals' depends on non-existent package 'LinearMath' and rosdep claims that it is not a system dependency. Check the ROS_PACKAGE_PATH or try calling 'rosdep update'


edit retag close merge delete

Sort by » oldest newest most voted

You don't mention which ROS distribution you are using, but if it is Groovy or Hydro, you want to include

<tf/LinearMath/btMatrix3x3.h>


and depend on tf, not LinearMath, which is not a package.

more

my apologies for the negligence. yes, i am using Groovy with Ubuntu 12.04. I suppose that the <tf linearmath="" btmatrix3x3.h=""> you mentioned is to be included in my cpp file? like this ( #include <tf linearmath="" btmatrix3x3.h=""> ) ?

( 2014-02-23 18:05:14 -0500 )edit

I have tried to put #include <tf linearmath="" btmatrix3x3.h="">, #include <tf matrix3x3.h=""> but it shows error

( 2014-02-23 18:11:04 -0500 )edit

apparently ROS answers mucked up my answer, those should be slashes... see the edit above

( 2014-02-23 20:38:08 -0500 )edit

Hi, i have tried to put #include <tf linearmath="" btmatrix3x3.h=""> but it shows ##fatal error: tf/LinearMath/btMatrix3x3.h: No such file or directory## My tf package is at /opt/ros/groovy/share/tf and inside has ##cmake msg package.xml srv## Could it be possibly that there is something wrong with my tf package?

( 2014-02-23 21:46:19 -0500 )edit

Hi, i managed to find the answer already :) it is in the package bullet. just put "#include<bullet linearmath="" btmatrix3x3.h="">" will do. Thanks for your help

( 2014-02-28 02:13:58 -0500 )edit

For anyone coming here looking for the kinetic version (like me), it is #include <tf/LinearMath/Matrix3x3.h

more

For Melodic users (like me) it is "tf/LinearMath/Matrix3x3.h". Make sure to include <build_depend>tf</build_depend> in your package.xml and add tf to find_package(catkin REQUIRED COMPONENTS) in your CmakeList.txt

more

This was the exact thing i was missing thanks, i didn't realize i was making use of the tf2 library

( 2021-10-21 08:36:32 -0500 )edit