This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geometry_msgs::Pose transformPose(geometry_msgs::Pose& _origin_to_frame, geometry_msgs::Pose& _frame_to_target) | |
{ | |
geometry_msgs::Pose result; | |
tf::Transform origin_to_frame_transform; | |
origin_to_frame_transform.setOrigin(tf::Vector3(_origin_to_frame.position.x, _origin_to_frame.position.y, _origin_to_frame.position.z)); | |
origin_to_frame_transform.setRotation(tf::Quaternion(_origin_to_frame.orientation.x, _origin_to_frame.orientation.y, | |
_origin_to_frame.orientation.z, _origin_to_frame.orientation.w)); | |
tf::Transform frame_to_target_transform; | |
frame_to_target_transform.setOrigin(tf::Vector3(_frame_to_target.position.x, _frame_to_target.position.y, _frame_to_target.position.z)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <geometry_msgs/Pose.h> | |
#include <kdl/tree.hpp> | |
bool getTransformFromKDL(KDL::Tree tree, std::string root, std::string child, geometry_msgs::Pose& pose) | |
{ | |
try | |
{ | |
KDL::Chain chain; | |
tree.getChain(root, child, chain); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset $(echo "${!PREFIX*}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def clean_arguments(args): | |
"""Cleans docopt arguments, removing --, - and < > from arguments | |
Parameters | |
---------- | |
args : dict | |
Dictionary with arguments form docopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pattern = re.compile(regex) | |
matched_keys = {key for key, value in dic.iteritems() if pattern.match(key)} | |
for key in matched_keys: | |
dic.pop(key, None) |