Skip to content
Snippets Groups Projects
Unverified Commit 83664dcc authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #8 from ori-drs/topic/fix-build-in-catkin-env

Fix build in catkin environment
parents b9d64b03 fd650d92
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ SET(CUSTOM_HEADER_DIR "hpp/anymal-rbprm") ...@@ -7,7 +7,7 @@ SET(CUSTOM_HEADER_DIR "hpp/anymal-rbprm")
SET(CXX_DISABLE_WERROR true) SET(CXX_DISABLE_WERROR true)
SET(PROJECT_USE_CMAKE_EXPORT TRUE) SET(PROJECT_USE_CMAKE_EXPORT TRUE)
INCLUDE(cmake/hpp.cmake) INCLUDE(cmake/base.cmake)
INCLUDE(cmake/python.cmake) INCLUDE(cmake/python.cmake)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
......
from pathlib import Path
def prefix():
"""$prefix/lib/pythonX.Y/site-packages/$module/__init__.py: extract prefix from module"""
return Path(__file__).parent.parent.parent.parent.parent
...@@ -19,12 +19,6 @@ ...@@ -19,12 +19,6 @@
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody as Parent from hpp.corbaserver.rbprm.rbprmfullbody import FullBody as Parent
from pinocchio import SE3 from pinocchio import SE3
import numpy as np import numpy as np
from pathlib import Path
def prefix(module):
"""$prefix/lib/pythonX.Y/site-packages/$module/__init__.py: extract prefix from module"""
return Path(module.__file__).parent.parent.parent.parent.parent
class Robot(Parent): class Robot(Parent):
...@@ -131,9 +125,9 @@ class Robot(Parent): ...@@ -131,9 +125,9 @@ class Robot(Parent):
legy = 0.02 legy = 0.02
import anymal_rbprm import anymal_rbprm
kinematic_constraints_path = str( kinematic_constraints_path = str(
prefix(anymal_rbprm) / "share/anymal-rbprm/com_inequalities/feet_quasi_flat/anymal_") anymal_rbprm.prefix() / "share/anymal-rbprm/com_inequalities/feet_quasi_flat/anymal_")
relative_feet_constraints_path = str( relative_feet_constraints_path = str(
prefix(anymal_rbprm) / "share/anymal-rbprm/relative_effector_positions/anymal_") anymal_rbprm.prefix() / "share/anymal-rbprm/relative_effector_positions/anymal_")
minDist = 0.2 minDist = 0.2
......
<?xml version='1.0'?> <?xml version='1.0'?>
<package format='2'> <package format='3'>
<name>anymal-rbprm</name> <name>anymal_rbprm</name>
<version>4.12.0</version> <version>4.12.0</version>
<description>Database for anymal robot using hpp-rbprm</description> <description>Database for anymal robot using hpp-rbprm</description>
...@@ -10,5 +10,12 @@ ...@@ -10,5 +10,12 @@
<author>Pierre Fernbach</author> <author>Pierre Fernbach</author>
<author>Steve Tonneau</author> <author>Steve Tonneau</author>
<buildtool_depend>catkin</buildtool_depend> <!-- The following tags are recommended by REP-136 -->
<exec_depend condition="$ROS_VERSION == 1">catkin</exec_depend>
<buildtool_depend>cmake</buildtool_depend>
<depend condition="$ROS_PYTHON_VERSION == 2">python</depend>
<depend condition="$ROS_PYTHON_VERSION == 3">python3</depend>
<export>
<build_type>cmake</build_type>
</export>
</package> </package>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment