moveit2
The MoveIt Motion Planning Framework for ROS 2.
cartesian_limit.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2018 Pilz GmbH & Co. KG
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Pilz GmbH & Co. KG nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 #pragma once
36 
38 {
45 {
46 public:
48 
49  // Translational Velocity Limit
50 
55  bool hasMaxTranslationalVelocity() const;
56 
61  void setMaxTranslationalVelocity(double max_trans_vel);
62 
68  double getMaxTranslationalVelocity() const;
69 
70  // Translational Acceleration Limit
71 
77 
82  void setMaxTranslationalAcceleration(double max_trans_acc);
83 
89  double getMaxTranslationalAcceleration() const;
90 
91  // Translational Deceleration Limit
92 
98 
103  void setMaxTranslationalDeceleration(double max_trans_dec);
104 
111  double getMaxTranslationalDeceleration() const;
112 
113  // Rotational Velocity Limit
114 
119  bool hasMaxRotationalVelocity() const;
120 
125  void setMaxRotationalVelocity(double max_rot_vel);
126 
131  double getMaxRotationalVelocity() const;
132 
133 private:
135  bool has_max_trans_vel_;
136 
138  double max_trans_vel_;
139 
141  bool has_max_trans_acc_;
142 
144  double max_trans_acc_;
145 
147  bool has_max_trans_dec_;
148 
150  double max_trans_dec_;
151 
153  bool has_max_rot_vel_;
154 
156  double max_rot_vel_;
157 };
158 
159 } // namespace pilz_industrial_motion_planner
Set of cartesian limits, has values for velocity, acceleration and deceleration of both the translati...
double getMaxRotationalVelocity() const
Return the maximal rotational velocity [rad/s], 0 if nothing was set.
void setMaxRotationalVelocity(double max_rot_vel)
Set the maximum rotational velocity.
bool hasMaxRotationalVelocity() const
Check if rotational velocity limit is set.
bool hasMaxTranslationalDeceleration() const
Check if translational deceleration limit is set.
void setMaxTranslationalVelocity(double max_trans_vel)
Set the maximal translational velocity.
double getMaxTranslationalDeceleration() const
Return the maximal translational deceleration [m/s^2], 0 if nothing was set.
void setMaxTranslationalAcceleration(double max_trans_acc)
Set the maximum translational acceleration.
bool hasMaxTranslationalVelocity() const
Check if translational velocity limit is set.
double getMaxTranslationalAcceleration() const
Return the maximal translational acceleration [m/s^2], 0 if nothing was set.
double getMaxTranslationalVelocity() const
Return the maximal translational velocity [m/s], 0 if nothing was set.
bool hasMaxTranslationalAcceleration() const
Check if translational acceleration limit is set.
void setMaxTranslationalDeceleration(double max_trans_dec)
Set the maximum translational deceleration.