Line |
Branch |
Exec |
Source |
1 |
|
|
// Copyright (c) 2016 CNRS |
2 |
|
|
// Author: Joseph Mirabel |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
// Redistribution and use in source and binary forms, with or without |
6 |
|
|
// modification, are permitted provided that the following conditions are |
7 |
|
|
// met: |
8 |
|
|
// |
9 |
|
|
// 1. Redistributions of source code must retain the above copyright |
10 |
|
|
// notice, this list of conditions and the following disclaimer. |
11 |
|
|
// |
12 |
|
|
// 2. Redistributions in binary form must reproduce the above copyright |
13 |
|
|
// notice, this list of conditions and the following disclaimer in the |
14 |
|
|
// documentation and/or other materials provided with the distribution. |
15 |
|
|
// |
16 |
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
17 |
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
18 |
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
19 |
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
20 |
|
|
// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
21 |
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 |
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
23 |
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 |
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 |
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 |
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
27 |
|
|
// DAMAGE. |
28 |
|
|
|
29 |
|
|
#ifndef HPP_MANIPULATION_CORBA_TOOLS_HH |
30 |
|
|
#define HPP_MANIPULATION_CORBA_TOOLS_HH |
31 |
|
|
|
32 |
|
|
#include <hpp/corbaserver/conversions.hh> |
33 |
|
|
#include <hpp/manipulation/problem-solver.hh> |
34 |
|
|
#include <pinocchio/spatial/se3.hpp> |
35 |
|
|
|
36 |
|
|
namespace hpp { |
37 |
|
|
using corbaServer::c_str; |
38 |
|
|
using corbaServer::floatSeqToVector; |
39 |
|
|
using corbaServer::matrixToIntSeqSeq; |
40 |
|
|
using corbaServer::toIntSeq; |
41 |
|
|
using corbaServer::toNames_t; |
42 |
|
|
using corbaServer::vectorToFloatSeq; |
43 |
|
|
using manipulation::DevicePtr_t; |
44 |
|
|
using manipulation::ProblemSolverPtr_t; |
45 |
|
|
using pinocchio::Transform3s; |
46 |
|
|
|
47 |
|
✗ |
inline std::vector<std::string> toStringVector(const Names_t& names) { |
48 |
|
|
typedef std::vector<std::string> Out_t; |
49 |
|
✗ |
return corbaServer::toStrings<Out_t>(names); |
50 |
|
|
} |
51 |
|
|
|
52 |
|
|
inline std::list<std::string> toStringList(const Names_t& names) { |
53 |
|
|
typedef std::list<std::string> Out_t; |
54 |
|
|
return corbaServer::toStrings<Out_t>(names); |
55 |
|
|
} |
56 |
|
|
|
57 |
|
✗ |
inline void Transform3sTohppTransform(const Transform3s& transform, |
58 |
|
|
CORBA::Double* config) { |
59 |
|
✗ |
corbaServer::toHppTransform(transform, config); |
60 |
|
|
} |
61 |
|
|
|
62 |
|
✗ |
inline void hppTransformToTransform3s(const CORBA::Double* inConfig, |
63 |
|
|
Transform3s& transform) { |
64 |
|
✗ |
corbaServer::toTransform3s(inConfig, transform); |
65 |
|
|
} |
66 |
|
|
|
67 |
|
|
DevicePtr_t getRobotOrThrow(ProblemSolverPtr_t p); |
68 |
|
|
} // namespace hpp |
69 |
|
|
|
70 |
|
|
#endif // HPP_MANIPULATION_CORBA_TOOLS_HH |
71 |
|
|
|