ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

cannot locate LinearMath/btMatrix3x3.h

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

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

3 Answers

Sort by ยป oldest newest most voted

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

fergs gravatar image

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

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 -0500 )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 -0500 )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 -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?

chao gravatar image chao  ( 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

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

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

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

answered 2021-05-22 16:43:52 -0500

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

edit flag offensive delete link more


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

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

Question Tools

1 follower


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

Seen: 3,529 times

Last updated: May 22 '21