Ask Your Question

cannot locate LinearMath/btMatrix3x3.h

asked 2014-02-23 02:41:13 -0600

chao gravatar image


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'

appreciate your help, thank you

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-02-23 08:22:17 -0600

fergs gravatar image

updated 2014-02-23 20:37:30 -0600

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


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

edit flag offensive delete link 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=""> ) ?

chao gravatar image chao  ( 2014-02-23 18:05:14 -0600 )edit

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

chao gravatar image chao  ( 2014-02-23 18:11:04 -0600 )edit

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

fergs gravatar image fergs  ( 2014-02-23 20:38:08 -0600 )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?

chao gravatar image chao  ( 2014-02-23 21:46:19 -0600 )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

chao gravatar image chao  ( 2014-02-28 02:13:58 -0600 )edit

answered 2017-06-07 01:50:41 -0600

ufr3c_tjc gravatar image

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-02-23 02:41:13 -0600

Seen: 2,601 times

Last updated: Jun 07 '17