cartesian_controller_utils.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef COB_CARTESIAN_CONTROLLER_CARTESIAN_CONTROLLER_UTILS_H
19 #define COB_CARTESIAN_CONTROLLER_CARTESIAN_CONTROLLER_UTILS_H
20 
21 #include <string>
22 #include <vector>
23 
24 #include <ros/ros.h>
25 #include <tf/transform_listener.h>
26 #include <tf/transform_datatypes.h>
27 
28 #include <geometry_msgs/PoseArray.h>
29 #include <visualization_msgs/MarkerArray.h>
31 
33 {
34 public:
36  {
37  marker_pub_ = nh_.advertise<visualization_msgs::MarkerArray>("cartesian_controller/preview_path", 1);
38  }
39 
40  void transformPose(const std::string source_frame, const std::string target_frame, const geometry_msgs::Pose pose_in, geometry_msgs::Pose& pose_out);
41  tf::StampedTransform getStampedTransform(const std::string& target_frame, const std::string& source_frame);
42  geometry_msgs::Pose getPose(const std::string& target_frame, const std::string& source_frame);
43 
44  bool inEpsilonArea(const tf::StampedTransform& stamped_transform, const double epsilon);
45  void poseToRPY(const geometry_msgs::Pose& pose, double& roll, double& pitch, double& yaw);
46 
47  void previewPath(const geometry_msgs::PoseArray pose_array);
48 
49  void adjustArrayLength(std::vector<cob_cartesian_controller::PathArray>& m);
50  void copyMatrix(std::vector<double>* path_array, std::vector<cob_cartesian_controller::PathArray>& m);
51  double roundUpToMultiplier(const double numberToRound, const double multiplier);
52 
53 private:
56  visualization_msgs::MarkerArray marker_array_;
57 
59 };
60 
61 #endif // COB_CARTESIAN_CONTROLLER_CARTESIAN_CONTROLLER_UTILS_H
visualization_msgs::MarkerArray marker_array_
void previewPath(const geometry_msgs::PoseArray pose_array)
std::string target_frame
tf::StampedTransform getStampedTransform(const std::string &target_frame, const std::string &source_frame)
double roundUpToMultiplier(const double numberToRound, const double multiplier)
void adjustArrayLength(std::vector< cob_cartesian_controller::PathArray > &m)
double epsilon
bool inEpsilonArea(const tf::StampedTransform &stamped_transform, const double epsilon)
tf::TransformListener tf_listener_
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void transformPose(const std::string source_frame, const std::string target_frame, const geometry_msgs::Pose pose_in, geometry_msgs::Pose &pose_out)
geometry_msgs::Pose getPose(const std::string &target_frame, const std::string &source_frame)
void poseToRPY(const geometry_msgs::Pose &pose, double &roll, double &pitch, double &yaw)
void copyMatrix(std::vector< double > *path_array, std::vector< cob_cartesian_controller::PathArray > &m)


cob_cartesian_controller
Author(s): Christoph Mark
autogenerated on Thu Apr 8 2021 02:40:13