Skip to content

Commit

Permalink
build: copy python packages into /usr instead of ~ros2 to avoid permi…
Browse files Browse the repository at this point in the history
…ssion issues (#155)
  • Loading branch information
LouisBrunner authored Feb 20, 2024
1 parent d0951f2 commit 8845c25
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

Release Versions:

- [7.3.0](#730)
- [7.2.0](#720)
- [7.1.1](#711)
Expand All @@ -12,6 +13,7 @@ Release Versions:

## Upcoming changes (in development)

- build: copy python packages into /usr instead of ~ros2 to avoid permission issues (#155)
- feat: Add ParameterType conversion functions to go from enum to type label and the inverse (#154)

## 7.3.0
Expand Down Expand Up @@ -68,7 +70,7 @@ minor improvements and fixes to state_representation.

- Update push hooks in build-release.yaml (#127)
- feat(ci): add prebuilt control-libraries image akin to network-interfaces (#125)
- Add overloaded `make_shared_parameter` with no parameter (#123)
- Add overloaded `make_shared_parameter` with no parameter (#123)
- Catch out of range exception in `ParameterMap::assert_parameter_valid` (#122)
- Construct zero matrices in compliant twist controller (#120)

Expand All @@ -82,6 +84,7 @@ and safe to use.
**state_representation**

The `State` class has been reworked, with the following breaking changes to the API:

- `State::initialize` has been reworked as `State::reset`.
- `State::is_compatible` has been removed in favor of the new `State::is_incompatible`.
- `State::set_empty` and `State::set_filled` have been removed from the public API.
Expand All @@ -108,7 +111,7 @@ All header files now use the `.hpp` extension.

**state_representation**

The timestamp of a `State` object is now consistently reset by every non-const method, so that it always indicates the
The timestamp of a `State` object is now consistently reset by every non-const method, so that it always indicates the
time of last modification. The method `State::get_age()` can be used to get the time since last modification in seconds.

The emptiness of a state is handled more consistently, and accessing data on an empty state will now throw an exception.
Expand All @@ -127,6 +130,7 @@ of a feedback state is passed through to the command as a feed-forward force or
**Python**

The Python bindings now include the exceptions for each module. For example:

- `from state_representation.exceptions import EmptyStateError`

The bindings have also been updated to include the breaking changes in `state_representation`.
Expand Down Expand Up @@ -160,7 +164,7 @@ A contributor license agreement and signature workflow have been added to protec
- Update python bindings after Jacobian refactor (#105)
- Set reference frame of Jacobian with string instead of pose (#103)
- Refactor Jacobian methods and operators (#101)
- Remove rows_ and cols_ and improve constructors (#100)
- Remove rows* and cols* and improve constructors (#100)
- Revise clproto to remove StateType and timestamp from State message (#104)
- Raise exception in getters if state is empty (#97)
- Bind error objects of all library modules with Pybind (#98)
Expand Down Expand Up @@ -188,7 +192,7 @@ A contributor license agreement and signature workflow have been added to protec
- Bind operators of Cartesian states (#60)
- Fix quaternion differentiation (#58)
- Refactor operators in CartesianState for addition (#23), subtraction (#33, #40), transformation (#28, #45),
division (#41) and multiplication (#43)
division (#41) and multiplication (#43)
- Add a Contributor License Agreement (#61)
- Uniformly sample orientation with UnitRandom (#56)
- Refactor get/set variable helpers in Cartesian and joint state (#39, #57)
Expand Down Expand Up @@ -239,4 +243,4 @@ and granted to AICA under a non-exclusive license agreement. All subsequent cont
AICA employees and are the property of AICA SA. For a full history of changes prior to version 6.2, refer to
the original project here:

- https://github.com/epfl-lasa/control-libraries/tree/v6.2.0
- https://github.com/epfl-lasa/control-libraries/tree/v6.2.0
12 changes: 5 additions & 7 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,15 @@ COPY --from=install /tmp/cl /usr
COPY --chown=${USER}:${USER} ./python /python
RUN --mount=type=cache,target=${HOME}/.cache,id=pip-${TARGETPLATFORM}-${CACHEID},uid=1000 \
python3 -m pip install --prefix=/tmp/python /python
RUN mkdir -p /tmp/python-home/${USER}/.local/lib/python3.10/ \
&& mv /tmp/python/local/lib/python3.10/dist-packages/ /tmp/python-home/${USER}/.local/lib/python3.10/site-packages/
RUN mv /tmp/python/local /tmp/python-usr

FROM base as python-stubs
ARG TARGETPLATFORM
ARG CACHEID
COPY --from=apt-dependencies /tmp/apt /
COPY --from=dependencies /tmp/deps /usr
COPY --from=install /tmp/cl /usr
COPY --from=python /tmp/python-home /home
COPY --from=python /tmp/python-usr /usr
RUN sudo pip install pybind11-stubgen
RUN --mount=type=cache,target=${HOME}/.cache,id=pip-${TARGETPLATFORM}-${CACHEID},uid=1000 \
<<HEREDOC
Expand Down Expand Up @@ -170,12 +169,11 @@ EoF
fi
done
HEREDOC
RUN mkdir -p /tmp/python-home/${USER}/.local/lib/python3.10/ \
&& mv /tmp/python/local/lib/python3.10/dist-packages/ /tmp/python-home/${USER}/.local/lib/python3.10/site-packages/
RUN mv /tmp/python/local /tmp/python-usr

FROM scratch as production
COPY --from=apt-dependencies /tmp/apt /
COPY --from=dependencies /tmp/deps /usr
COPY --from=install /tmp/cl /usr
COPY --from=python /tmp/python-home /home
COPY --from=python-stubs /tmp/python-home /home
COPY --from=python /tmp/python-usr /usr
COPY --from=python-stubs /tmp/python-usr /usr
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.3.1
7.3.2
2 changes: 1 addition & 1 deletion demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(control_libraries 7.3.1 CONFIG REQUIRED)
find_package(control_libraries 7.3.2 CONFIG REQUIRED)

set(DEMOS_SCRIPTS
task_space_control_loop
Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Control Libraries"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 7.3.1
PROJECT_NUMBER = 7.3.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion protocol/clproto_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(clproto VERSION 7.3.1)
project(clproto VERSION 7.3.2)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# names of the environment variables that define osqp and openrobots include directories
osqp_path_var = 'OSQP_INCLUDE_DIR'

__version__ = "7.3.1"
__version__ = "7.3.2"
__libraries__ = ['state_representation', 'clproto', 'controllers', 'dynamical_systems', 'robot_model']
__include_dirs__ = ['include']

Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(control_libraries VERSION 7.3.1)
project(control_libraries VERSION 7.3.2)

# Build options
option(BUILD_TESTING "Build all tests." OFF)
Expand Down

0 comments on commit 8845c25

Please sign in to comment.