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

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

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

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 -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

Question Tools


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

Seen: 211 times

Last updated: Dec 14 '12