ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

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

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

usamayaseen gravatar image


I want to call quat_to_angle() and normalize_angle() methods defined in in the turtlebot_calibration package in my node written in C++. There is no header file generated of, 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?




edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

dornhege gravatar image

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

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


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

Seen: 185 times

Last updated: Dec 14 '12