Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ jobs:
catkin-test-args: --no-deps
build-packages: multi_contact_controller
test-packages: multi_contact_controller
- name: Check python
run: |
set -e
set -x
python -c "from distutils import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
- name: Run simulation
if: env.RUN_SIMULATION_STEPS == 'true'
# https://github.com/jrl-umi3218/lipm_walking_controller/blob/b564d655388ae6a6725c504e5c74a62192e58c7c/.github/workflows/build.yml#L64-L92
Expand Down
23 changes: 23 additions & 0 deletions cnoid/project/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
if(NOT ${CHOREONOID_USE_PYTHON2})
execute_process(
COMMAND python3 -c "import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
execute_process(
COMMAND python2 -c "from distutils import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
if(NOT PYTHON_VERSION_SUCCESS STREQUAL 0)
execute_process(
COMMAND python -c "from distutils import sysconfig; print(sysconfig.get_config_var(\"VERSION\"))"
OUTPUT_VARIABLE PYTHON_VERSION
RESULT_VARIABLE PYTHON_VERSION_SUCCESS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message("-- Python version detected: ${PYTHON_VERSION}")

set(MCC_CNOID_CONFIG_FILE_LIST
rtc.conf.choreonoid
robot.conf
RobotHardware.conf
PDcontroller.conf.choreonoid
PDgains_sim.dat
)

foreach(CNOID_CONFIG_FILE IN LISTS MCC_CNOID_CONFIG_FILE_LIST)
execute_process(COMMAND cmake -E create_symlink
"${HRPSYSBASE_PREFIX}/share/hrpsys/samples/JVRC1/${CNOID_CONFIG_FILE}"
Expand Down
2 changes: 1 addition & 1 deletion cnoid/project/MCC_JVRC1_SampleField.in.cnoid
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ OpenRTM:
"deleteUnmanagedRTCsOnStartingSimulation": true
Python:
"moduleSearchPath":
- @HRPSYSBASE_PREFIX@/lib/python2.7/dist-packages/hrpsys
- @HRPSYSBASE_PREFIX@/lib/python@PYTHON_VERSION@/dist-packages/hrpsys
viewAreas:
-
type: embedded
Expand Down