Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Oct 30, 2023
2 parents 78b150c + 39ae28f commit d1ed7a7
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 20 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo

## [Unreleased]

### Changed
* Enable publishing of robot joints in ROS 2 via `controlBoard_nws_ros2` for `iCubGazeboV2_5_visuomanip` (https://github.com/robotology/icub-models/pull/211).
* CMake: Permit to explictly specify Python installation directory by setting the `ICUB_MODELS_PYTHON_INSTALL_DIR` CMake variable (https://github.com/robotology/icub-models/pull/218).

### Fixed
* Fixed wrong simulated finger hall effect sensors port names prefix for `iCubGazeboV2_5_visuomanip` (https://github.com/robotology/icub-models/pull/215).

# [2.3.0] - 2023-09-11

### Fixed

* Fix location of `*_foot_*` links in iCub3 models (https://github.com/robotology/icub-models-generator/pull/243).
* Fixed publication of xsens imu on iCubGazeboV2_7 (https://github.com/robotology/icub-models-generator/pull/246).

# [2.2.2] - 2023-07-10

### Fixed
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright: (C) 2022 Fondazione Istituto Italiano di Tecnologia
# Copyright: (C) Fondazione Istituto Italiano di Tecnologia
# Authors: Silvio Traversaro
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.8...3.16)

project(icub-models
VERSION 2.2.2)
VERSION 2.3.0)

include(GNUInstallDirs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ max_damping 100.0 100.0 100.0 100.0
trajectory_type minimum_jerk

[COUPLING]
fingers_abduction_control (0 1 2 3) (l_hand_fingers reserved reserved reserved reserved) (0.0) (60.0)
fingers_abduction_control (0 1 2 3) (l_hand_finger reserved reserved reserved reserved) (0.0) (60.0)

#PIDs:
# this information is used to set the PID values in simulation for GAZEBO, we need only the first three values
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[include "./gazebo_icub_robotname.ini"]

[WRAPPER]
name /${gazeboYarpPluginsRobotName}/left_hand/analog:o
name /icubSim/left_hand/analog:o
period 10
networks (left_mais)
device analogServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ max_damping 100.0 100.0 100.0 100.0
trajectory_type minimum_jerk

[COUPLING]
fingers_abduction_control (0 1 2 3) (r_hand_fingers reserved reserved reserved reserved) (0.0) (60.0)
fingers_abduction_control (0 1 2 3) (r_hand_finger reserved reserved reserved reserved) (0.0) (60.0)

#PIDs:
# this information is used to set the PID values in simulation for GAZEBO, we need only the first three values
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[include "./gazebo_icub_robotname.ini"]

[WRAPPER]
name /${gazeboYarpPluginsRobotName}/right_hand/analog:o
name /icubSim/right_hand/analog:o
period 10
networks (right_mais)
device analogServer
Expand Down
43 changes: 43 additions & 0 deletions iCub_manual/conf_manual/iCubGazeboV2_5_visuomanip/icub_ros2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<robot name="iCubGazeboV3" build="1" portprefix="/icubSim" xmlns:xi="http://www.w3.org/2001/XInclude">
<devices>

<!-- MOTOR CONTROLLERS -->

<!-- wrapper are all inherited from automatically generated models -->
<xi:include href="../../../iCub/conf/wrappers/motorControl/torso-mc_wrapper.xml" />
<xi:include href="../../../iCub/conf/wrappers/motorControl/head-mc_wrapper.xml" />
<xi:include href="../../../iCub/conf/wrappers/motorControl/left_arm-mc_wrapper.xml" />
<xi:include href="../../../iCub/conf/wrappers/motorControl/right_arm-mc_wrapper.xml" />

<!-- only the torso remapper is inherited from automatically generated models -->
<xi:include href="../../../iCub/conf/wrappers/motorControl/torso-mc_remapper.xml" />

<!-- all the other remappers are specific to this model due to eyes and fingers -->
<xi:include href="wrappers/motorControl/head-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/left_arm-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/right_arm-mc_remapper.xml" />
<!-- -->

<!-- HEAD SENSORS -->

<xi:include href="wrappers/camera/left_camera-rgbd_wrapper.xml" />
<xi:include href="wrappers/camera/right_camera-rgb_wrapper.xml" />

<!-- -->

<!-- INERTIAL SENSORS -->

<!-- this wrapper is inherited from automatically generated models -->
<xi:include href="../../../iCub/conf/wrappers/inertials/head-inertials_wrapper.xml" />

<!-- -->

<!-- ROS 2 entries -->
<xi:include href="wrappers/motorControl/alljoints-mc_remapper.xml" />
<xi:include href="wrappers/motorControl/alljoints-mc_nws_ros2.xml" />

</devices>
</robot>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints-mc_nws_ros2" type="controlBoard_nws_ros2">
<param name="node_name"> icub_cb_node </param>
<param name="topic_name"> /joint_states </param>
<action phase="startup" level="10" type="attach">
<param name="device"> alljoints-mc_remapper </param>
</action>
<action phase="shutdown" level="15" type="detach" />
</device>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE devices PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<device xmlns:xi="http://www.w3.org/2001/XInclude" name="alljoints-mc_remapper" type="controlboardremapper">
<param name="axesNames">(neck_pitch neck_roll neck_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw l_elbow l_wrist_prosup l_wrist_pitch l_wrist_yaw r_shoulder_pitch r_shoulder_roll r_shoulder_yaw r_elbow r_wrist_prosup r_wrist_pitch r_wrist_yaw torso_yaw torso_roll torso_pitch)</param>
<action phase="startup" level="5" type="attach">
<paramlist name="networks">
<elem name="head_joints"> head_hardware_device </elem>
<elem name="left_arm_joints"> left_arm_hardware_device</elem>
<elem name="right_arm_joints"> right_arm_hardware_device </elem>
<elem name="torso_joints"> torso_hardware_device </elem>
</paramlist>
</action>
<action phase="shutdown" level="20" type="detach"/>
</device>
2 changes: 1 addition & 1 deletion iCub_manual/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<package>
<name>iCub</name>
<version>2.2.2</version>
<version>2.3.0</version>
<description>
This is not an actual package, but rather a placeholder to
make sure that the share/iCub directory is found as the
Expand Down
24 changes: 16 additions & 8 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ if(ICUB_MODELS_USES_PYTHON)
FALSE)

# Install the resulting Python package for the active interpreter
if(ICUB_MODELS_DETECT_ACTIVE_PYTHON_SITEPACKAGES)
set(PYTHON_INSTDIR ${Python3_SITELIB}/icub_models)
else()
execute_process(COMMAND ${Python3_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix=''))"
OUTPUT_VARIABLE _PYTHON_INSTDIR)

string(STRIP ${_PYTHON_INSTDIR} _PYTHON_INSTDIR_CLEAN)
set(PYTHON_INSTDIR ${_PYTHON_INSTDIR_CLEAN}/icub_models)
if(NOT DEFINED ICUB_MODELS_PYTHON_INSTALL_DIR)
if(ICUB_MODELS_DETECT_ACTIVE_PYTHON_SITEPACKAGES)
set(ICUB_MODELS_PYTHON_INSTALL_DIR ${Python3_SITELIB})
else()
if(Python3_VERSION VERSION_GREATER_EQUAL 3.12)
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import os;import sysconfig;relative_site_packages = sysconfig.get_path('purelib').replace(sysconfig.get_path('data'), '').lstrip(os.path.sep);print(relative_site_packages)"
OUTPUT_VARIABLE _PYTHON_INSTDIR)
else()
execute_process(COMMAND ${Python3_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix=''))"
OUTPUT_VARIABLE _PYTHON_INSTDIR)
endif()
string(STRIP ${_PYTHON_INSTDIR} _PYTHON_INSTDIR_CLEAN)
set(ICUB_MODELS_PYTHON_INSTALL_DIR ${_PYTHON_INSTDIR_CLEAN})
endif()
endif()
set(PYTHON_INSTDIR ${ICUB_MODELS_PYTHON_INSTALL_DIR}/icub_models)



# Install the __init__.py file
Expand Down

0 comments on commit d1ed7a7

Please sign in to comment.