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
ros::Publisher
CartesianControllerUtils::inEpsilonArea
bool inEpsilonArea(const tf::StampedTransform &stamped_transform, const double epsilon)
Definition: cartesian_controller_utils.cpp:89
ros.h
CartesianControllerUtils
Definition: cartesian_controller_utils.h:32
CartesianControllerUtils::marker_array_
visualization_msgs::MarkerArray marker_array_
Definition: cartesian_controller_utils.h:56
CartesianControllerUtils::getPose
geometry_msgs::Pose getPose(const std::string &target_frame, const std::string &source_frame)
Definition: cartesian_controller_utils.cpp:23
tf::StampedTransform
ros::NodeHandle::advertise
Publisher advertise(AdvertiseOptions &ops)
CartesianControllerUtils::getStampedTransform
tf::StampedTransform getStampedTransform(const std::string &target_frame, const std::string &source_frame)
Definition: cartesian_controller_utils.cpp:36
CartesianControllerUtils::tf_listener_
tf::TransformListener tf_listener_
Definition: cartesian_controller_utils.h:55
CartesianControllerUtils::roundUpToMultiplier
double roundUpToMultiplier(const double numberToRound, const double multiplier)
Definition: cartesian_controller_utils.cpp:178
CartesianControllerUtils::nh_
ros::NodeHandle nh_
Definition: cartesian_controller_utils.h:54
CartesianControllerUtils::poseToRPY
void poseToRPY(const geometry_msgs::Pose &pose, double &roll, double &pitch, double &yaw)
Definition: cartesian_controller_utils.cpp:115
transform_listener.h
transform_datatypes.h
CartesianControllerUtils::CartesianControllerUtils
CartesianControllerUtils()
Definition: cartesian_controller_utils.h:35
CartesianControllerUtils::marker_pub_
ros::Publisher marker_pub_
Definition: cartesian_controller_utils.h:58
tf::TransformListener
CartesianControllerUtils::transformPose
void transformPose(const std::string source_frame, const std::string target_frame, const geometry_msgs::Pose pose_in, geometry_msgs::Pose &pose_out)
Definition: cartesian_controller_utils.cpp:60
cartesian_controller_data_types.h
test_move_circ_interface.pose
pose
Definition: test_move_circ_interface.py:28
CartesianControllerUtils::copyMatrix
void copyMatrix(std::vector< double > *path_array, std::vector< cob_cartesian_controller::PathArray > &m)
Definition: cartesian_controller_utils.cpp:170
CartesianControllerUtils::adjustArrayLength
void adjustArrayLength(std::vector< cob_cartesian_controller::PathArray > &m)
Definition: cartesian_controller_utils.cpp:153
ros::NodeHandle
CartesianControllerUtils::previewPath
void previewPath(const geometry_msgs::PoseArray pose_array)
Definition: cartesian_controller_utils.cpp:122


cob_cartesian_controller
Author(s): Christoph Mark
autogenerated on Mon May 1 2023 02:44:52