Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
pinocchio
Commits
950cdc75
Commit
950cdc75
authored
9 years ago
by
jcarpent
Committed by
Florian Valenza
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[Fix bug][Python] Define flag in order to control Lua inclusion
parent
57c3d9a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/CMakeLists.txt
+8
-0
8 additions, 0 deletions
src/CMakeLists.txt
src/python/parsers.hpp
+9
-2
9 additions, 2 deletions
src/python/parsers.hpp
with
17 additions
and
2 deletions
src/CMakeLists.txt
+
8
−
0
View file @
950cdc75
...
...
@@ -18,6 +18,11 @@ MACRO(ADD_SOURCE_GROUP FILENAMES)
ADD_GROUP
(
"Source Files"
${
FILENAMES
}
)
ENDMACRO
(
ADD_SOURCE_GROUP FILENAMES
)
MACRO
(
ADD_TARGET_CFLAGS target flag
)
GET_TARGET_PROPERTY
(
${
target
}
_CFLAGS
${
target
}
COMPILE_FLAGS
)
SET_PROPERTY
(
TARGET
${
target
}
PROPERTY COMPILE_FLAGS
"
${${
target
}
_CFLAGS
}
${
flag
}
"
)
ENDMACRO
(
ADD_TARGET_CFLAGS
)
# ----------------------------------------------------
# --- C++ --------------------------------------------
# ----------------------------------------------------
...
...
@@ -70,6 +75,9 @@ IF(EIGENPY_FOUND)
TARGET_LINK_LIBRARIES
(
${
PYWRAP
}
${
Boost_LIBRARIES
}
${
PROJECT_NAME
}
)
SET_TARGET_PROPERTIES
(
${
PYWRAP
}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
/lib/python/
${
PROJECT_NAME
}
"
)
IF
(
LUA5_1_FOUND
)
ADD_TARGET_CFLAGS
(
${
PYWRAP
}
"-DWITH_LUA"
)
ENDIF
(
LUA5_1_FOUND
)
INSTALL
(
FILES
"
${
CMAKE_BINARY_DIR
}
/lib/python/
${
PROJECT_NAME
}
/lib
${
PYWRAP
}
.so"
DESTINATION
${
PYTHON_SITELIB
}
/
${
PROJECT_NAME
}
)
...
...
This diff is collapsed.
Click to expand it.
src/python/parsers.hpp
+
9
−
2
View file @
950cdc75
...
...
@@ -8,7 +8,10 @@
#include
"pinocchio/python/data.hpp"
#include
"pinocchio/multibody/parser/urdf.hpp"
#include
"pinocchio/multibody/parser/lua.hpp"
#ifdef WITH_LUA
#include
"pinocchio/multibody/parser/lua.hpp"
#endif // #ifdef WITH_LUA
namespace
se3
{
...
...
@@ -24,6 +27,7 @@ namespace se3
return
ModelHandler
(
model
,
true
);
}
#ifdef WITH_LUA
static
ModelHandler
buildModelFromLua
(
const
std
::
string
&
filename
,
bool
ff
,
bool
verbose
...
...
@@ -33,6 +37,7 @@ namespace se3
*
model
=
se3
::
lua
::
buildModel
(
filename
,
ff
,
verbose
);
return
ModelHandler
(
model
,
true
);
}
#endif // #ifdef WITH_LUA
/* --- Expose --------------------------------------------------------- */
static
void
expose
()
...
...
@@ -43,17 +48,19 @@ namespace se3
"Parse the urdf file given in input and return a proper pinocchio model "
"(remember to create the corresponding data structure)."
);
#ifdef WITH_LUA
bp
::
def
(
"buildModelFromLua"
,
buildModelFromLua
,
bp
::
args
(
"Filename (string)"
,
"Free flyer (bool, false for a fixed robot)"
,
"Verbose option "
),
"Parse the urdf file given in input and return a proper pinocchio model "
"(remember to create the corresponding data structure)."
);
#endif // #ifdef WITH_LUA
}
};
}}
// namespace se3::python
#endif // ifndef __se3_python_
data
_hpp__
#endif // ifndef __se3_python_
parsers
_hpp__
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment