Main Page
Namespaces
Classes
Files
File List
File Members
src
trajectory_profile_generator
trajectory_profile_generator_builder.cpp
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
#include <
cob_cartesian_controller/trajectory_profile_generator/trajectory_profile_generator_builder.h
>
19
#include <
cob_cartesian_controller/trajectory_profile_generator/trajectory_profile_generator_ramp.h
>
20
#include <
cob_cartesian_controller/trajectory_profile_generator/trajectory_profile_generator_sinoid.h
>
21
#include <cob_cartesian_controller/Profile.h>
22
23
/* BEGIN TrajectoryProfileBuilder *****************************************************************************************/
24
TrajectoryProfileBase
*
TrajectoryProfileBuilder::createProfile
(
const
cob_cartesian_controller::CartesianActionStruct
& params)
25
{
26
cob_cartesian_controller::Profile
msg
;
27
28
const
int
RAMP =
static_cast<
const
int
>
(msg.RAMP);
29
const
int
SINOID =
static_cast<
const
int
>
(msg.SINOID);
30
31
TrajectoryProfileBase
* ib =
NULL
;
32
switch
(params.
profile
.
profile_type
)
33
{
34
case
RAMP:
35
ib =
new
TrajectoryProfileRamp
(params);
36
break
;
37
case
SINOID:
38
ib =
new
TrajectoryProfileSinoid
(params);
39
break
;
40
default
:
41
ROS_ERROR
(
"Unknown Profile"
);
42
break
;
43
}
44
45
return
ib;
46
}
47
/* END TrajectoryProfileBuilder *******************************************************************************************/
msg
msg
NULL
#define NULL
cob_cartesian_controller::ProfileStruct::profile_type
unsigned int profile_type
Definition:
cartesian_controller_data_types.h:31
cob_cartesian_controller::CartesianActionStruct::profile
ProfileStruct profile
Definition:
cartesian_controller_data_types.h:60
trajectory_profile_generator_ramp.h
TrajectoryProfileRamp
Definition:
trajectory_profile_generator_ramp.h:25
TrajectoryProfileSinoid
Definition:
trajectory_profile_generator_sinoid.h:25
TrajectoryProfileBuilder::createProfile
static TrajectoryProfileBase * createProfile(const cob_cartesian_controller::CartesianActionStruct ¶ms)
Definition:
trajectory_profile_generator_builder.cpp:24
TrajectoryProfileBase
Definition:
trajectory_profile_generator_base.h:29
cob_cartesian_controller::CartesianActionStruct
Definition:
cartesian_controller_data_types.h:55
trajectory_profile_generator_builder.h
ROS_ERROR
#define ROS_ERROR(...)
trajectory_profile_generator_sinoid.h
cob_cartesian_controller
Author(s): Christoph Mark
autogenerated on Thu Apr 8 2021 02:40:13