Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pose_cov_ops Issue Converting Pose With Covariance #8

Open
vicententu opened this issue Jun 18, 2020 · 2 comments
Open

Pose_cov_ops Issue Converting Pose With Covariance #8

vicententu opened this issue Jun 18, 2020 · 2 comments

Comments

@vicententu
Copy link

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

@jlblancoc
Copy link
Member

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?

@vicententu
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants