Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef DOOR_FUNCTIONS_H
00036 #define DOOR_FUNCTIONS_H
00037
00038 #include <door_msgs/Door.h>
00039 #include <door_msgs/DoorCmd.h>
00040 #include <tf/tf.h>
00041 #include <string.h>
00042 #include <kdl/frames.hpp>
00043
00044 namespace pr2_doors_common{
00045
00047 tf::Stamped<tf::Pose> getRobotPose(const door_msgs::Door& door, double dist);
00048 tf::Stamped<tf::Pose> getGripperPose(const door_msgs::Door& door, double angle, double dist);
00049 tf::Stamped<tf::Pose> getGripperPose(const door_msgs::Door& door, double angle, double dist, int side);
00050 tf::Stamped<tf::Pose> getHandlePose(const door_msgs::Door& door, int side=1);
00051 double getNearestDoorAngle(const tf::Pose& robot_pose, const door_msgs::Door& door, double robot_dist, double touch_dist);
00052
00054 double getDoorAngle(const door_msgs::Door& door);
00055 double getVectorAngle(const KDL::Vector& v1, const KDL::Vector& v2);
00056 KDL::Vector getDoorNormal(const door_msgs::Door& door);
00057 KDL::Vector getFrameNormal(const door_msgs::Door& door);
00058 double getFrameAngle(const door_msgs::Door& door);
00059 double getDoorDir(const door_msgs::Door& d);
00060 double getHandleDir(const door_msgs::Door& d);
00061
00062
00064 bool transformTo(const tf::Transformer& tf, const std::string& goal_frame, const door_msgs::Door& door_in,
00065 door_msgs::Door& door_out, const std::string& fixed_frame="odom_combined");
00066 bool transformPointTo(const tf::Transformer& tf, const std::string& source_frame, const std::string& goal_frame, const ros::Time& time_source,
00067 const geometry_msgs::Point32& point_in, geometry_msgs::Point32& point_out, const std::string& fixed_frame, const ros::Time& time_goal);
00068 bool transformVectorTo(const tf::Transformer& tf, const std::string& source_frame, const std::string& goal_frame, const ros::Time& time_source,
00069 const geometry_msgs::Vector3& point_in, geometry_msgs::Vector3& point_out, const std::string& fixed_frame, const ros::Time& time_goal);
00070
00071 std::ostream& operator<< (std::ostream& os, const door_msgs::Door& d);
00072 std::vector<geometry_msgs::Point> getPolygon(const door_msgs::Door& door, const double &door_thickness);
00073 door_msgs::Door rotateDoor(const door_msgs::Door& door, const double &angle);
00074 geometry_msgs::Point32 getHingeAxisPoint(const door_msgs::Door& door);
00075 geometry_msgs::Point32 getEdgePoint(const door_msgs::Door& door);
00076
00077 }
00078 #endif