moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
motioncmd.h
Go to the documentation of this file.
1/*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2019 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
37#include <string>
38#include <memory>
39
41
43{
48{
49public:
53
54public:
55 void setPlanningGroup(const std::string& planning_group);
56 const std::string& getPlanningGroup() const;
57
58 void setVelocityScale(double velocity_scale);
59 void setAccelerationScale(double acceleration_scale);
60
61protected:
62 std::string planning_group_;
64 std::string target_link_;
65 double vel_scale_{ 1.0 };
66 double acc_scale_{ 1.0 };
67};
68
69inline void MotionCmd::setPlanningGroup(const std::string& planning_group)
70{
71 planning_group_ = planning_group;
72}
73
74inline const std::string& MotionCmd::getPlanningGroup() const
75{
76 return planning_group_;
77}
78
79inline void MotionCmd::setVelocityScale(double velocity_scale)
80{
81 vel_scale_ = velocity_scale;
82}
83
84inline void MotionCmd::setAccelerationScale(double acceleration_scale)
85{
86 acc_scale_ = acceleration_scale;
87}
88
89using MotionCmdUPtr = std::unique_ptr<MotionCmd>;
90} // namespace pilz_industrial_motion_planner_testutils
Base class for commands storing all general information of a command.
Definition motioncmd.h:48
std::string target_link_
Link to which all cartesian poses refer to.
Definition motioncmd.h:64
void setAccelerationScale(double acceleration_scale)
Definition motioncmd.h:84
void setPlanningGroup(const std::string &planning_group)
Definition motioncmd.h:69
Interface class to express that a derived class can be converted into a planning_interface::MotionPla...
std::unique_ptr< MotionCmd > MotionCmdUPtr
Definition motioncmd.h:89