Ask Your Question
0

How to call methods defined in python in a node written in C++

asked 2012-12-13 23:58:03 -0500

usamayaseen gravatar image

Hi,

I want to call quat_to_angle() and normalize_angle() methods defined in calibrate.py in the turtlebot_calibration package in my node written in C++. There is no header file generated of calibrate.py, so is there any way that i can use these methods in my C++ code without rewriting these methods in C++? If not then can u please tell some alternate implementations of these methods already done by someone else?

Thanks

Regards

Usama

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-12-14 00:23:28 -0500

dornhege gravatar image

updated 2012-12-14 00:24:52 -0500

Not without some major overhead compared to the functions.

For C++: normalize_angle can be found in the angles package (angles/angles.h) and quat_to_angle can be done using tf functions. For the yaw use tf::getYaw. You can provide a tf::Quaternion or a geometry_msgs::Quaternion.

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

Stats

Asked: 2012-12-13 23:58:03 -0500

Seen: 124 times

Last updated: Dec 14 '12