pose_cov_ops icon indicating copy to clipboard operation
pose_cov_ops copied to clipboard

Pose_cov_ops Issue Converting Pose With Covariance

Open vicententu opened this issue 4 years ago • 2 comments

Hello this is my first time raising an issue in github

I am trying to use the pose_cov_ops package to transform between 2 poses. I am trying to use this to transform between PoseWithCovariance messages obtained from a topic.

I have cloned the pose_cov_ops package into my ws and also installed all the dependencies listed. I have also installed mrpt-apps 1.5.

however when I try to include the pose composition in my packages I am faced with the error bellow. I have then tried to write a simple node inside of the pose_cov_ops/src to test if the pose composition works but it still gives me the same error. I am leaving my simple code bellow and also the error.

The code:

#include <geometry_msgs/PoseWithCovarianceStamped.h> #include "pose_cov_ops/pose_cov_ops.h" using namespace std;

int main () { geometry_msgs::Pose p1, p2, pf;

p2.position.x = -0.00641291096293 ; p2.position.y = -1.19828269689; p2.position.z = 2.30861438264; p2.orientation.x = 0.999995396035; p2.orientation.y = 0.000190637451451; p2.orientation.z = 0.000343502532546; p2.orientation.w = -0.003008915598 ;

pose_cov_ops::compose(p1,p2, pf);

cout << pf <<endl; }

ThIs gives me the following error when trying to build the package using catkin build

Errors << pose_cov_ops:make /home/vicente/catkin_ws/logs/pose_cov_ops/build.make.006.log
CMakeFiles/pose_comp.dir/src/pose_comp.cpp.o: In function main': pose_comp.cpp:(.text+0xb2): undefined reference to pose_cov_ops::compose(geometry_msgs::Pose_<std::allocator > const&, geometry_msgs::Pose_<std::allocator > const&, geometry_msgs::Pose_<std::allocator >&)' collect2: error: ld returned 1 exit status make[2]: *** [/home/vicente/catkin_ws/devel/.private/pose_cov_ops/lib/pose_cov_ops/pose_comp] Error 1 make[1]: *** [CMakeFiles/pose_comp.dir/all] Error 2 make: *** [all] Error 2 cd /home/vicente/catkin_ws/build/pose_cov_ops; catkin build --get-env pose_cov_ops | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -

Thank you for your help

vicententu avatar Jun 18 '20 14:06 vicententu

Can you please post a complete example with a .cpp and its CMakeLists.txt (and package.xml, if used) so we can try to identify the problem?

jlblancoc avatar Jun 22 '20 11:06 jlblancoc

Hello, I am uploading of the example I am trying to create. The pose_comp.cpp is in the src of my package, I have also attached the CmakeLists.txt and the package.xml

I hope this helps.

Thanks

pose_comp.zip

vicententu avatar Jun 22 '20 11:06 vicententu