Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nramuzat/gepetto-utils
  • gbuondon/gepetto-utils
  • fbailly/gepetto-utils
  • ostasse/gepetto-utils
  • gsaurel/gepetto-utils
  • gepetto/gepetto-utils
6 results
Show changes
Commits on Source (303)
Showing with 307 additions and 9 deletions
diffs
File moved
ci:
skip:
- treefmt
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
- id: treefmt
name: treefmt
entry: treefmt
language: system
always_run: true
BSD 2-Clause License
Copyright (c) 2017, Guilhem Saurel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Gepetto Packages Dashboard
# Gepetto Utils
## APIs
This is a set of tools for the gepetto team.
- github: https://api.github.com/orgs/stack-of-tasks/repos
- gitlab: https://eur0c.laas.fr/api/v4/projects
- redmine: https://redmine.laas.fr/projects.json
## [Docker](docker)
## RUN
Some standard Dockerfile to build our projects in various configurations, especially to ease debugging.
```
rm db.sqlite3 ; and ./manage.py migrate; and ./manage.py runserver localhost:8001
```
## [Newcomers](newcomers)
Automatically find new gepettists, and send them a greetings mail, with some useful informations
## [Scripts](scripts)
Set of little useful scripts
ARG DIST=18.04
FROM memmos.laas.fr:5000/gepetto/buildfarm/robotpkg-py3:$DIST as build
RUN for dep in math/eiquadprog; do \
make install -C $dep; \
make clean -C $dep; \
done
ARG DIST=18.04
FROM memmos.laas.fr:5000/gepetto/buildfarm/robotpkg-py3:$DIST
WORKDIR /src
USER root
ARG DIST=18.04
RUN echo "DIST=${DIST}" > /dist
ADD build.sh build.py /
ADD dist/${DIST}.sh /dist.sh
RUN bash /dist.sh
ARG PARALLEL=1
ENV CTEST_PARALLEL_LEVEL=${PARALLEL}
ADD https://api.github.com/repos/nim65s/eigenpy/commits/topic/multipy /
RUN /build.sh eigenpy
ADD https://api.github.com/repos/nim65s/hpp-fcl/commits/topic/multipy /
RUN /build.sh hpp-fcl
ADD https://api.github.com/repos/nim65s/pinocchio/commits/topic/multipy /
RUN /build.sh pinocchio
ADD https://api.github.com/repos/nim65s/example-robot-data/commits/topic/multipy /
RUN /build.sh example-robot-data
ADD https://api.github.com/repos/nim65s/curves/commits/topic/multipy /
RUN /build.sh curves
ADD https://api.github.com/repos/nim65s/multicontact-api/commits/topic/multipy /
RUN /build.sh multicontact-api
COPY --from=build /opt/openrobots /opt/openrobots
ADD https://api.github.com/repos/nim65s/tsid/commits/topic/multipy /
RUN /build.sh tsid
ADD https://api.github.com/repos/nim65s/crocoddyl/commits/topic/multipy /
RUN /build.sh crocoddyl
ADD run.sh run.py /
CMD /run.sh
# All
These Dockerfile are meant to test one script in many distrib / python / build type configurations / etc.
configurations
#!/usr/bin/env python3
"""
Build all Dockerfiles and check the build result
"""
import asyncio
import sys
from asyncio.subprocess import DEVNULL, PIPE
DISTRIBUTIONS = (
"16.04 18.04 20.04 fedora28 fedora31 archlinux stretch buster centos7".split()
)
async def build_run(dist, verbose=False, parallel=1):
"""Build and run a dockerfile."""
cmd = f"docker build --build-arg DIST={dist} --build-arg PARALLEL={parallel} -t all/{dist} ."
if verbose:
print(f"+ {cmd}\r")
proc = await asyncio.create_subprocess_exec(
*cmd.split(), stdout=DEVNULL, stderr=DEVNULL
)
await proc.wait()
if proc.returncode != 0:
print(f"{dist:10} build failed\r")
return
cmd = f"docker run --rm -it all/{dist}"
if verbose:
print(f"+ {cmd}\r")
proc = await asyncio.create_subprocess_exec(
*cmd.split(), stdout=PIPE, stderr=DEVNULL
)
stdout, _ = await proc.communicate()
stdout = stdout.decode().replace("\r\n", " ")
if proc.returncode == 0:
print(f"{dist:10} {stdout}\r")
else:
print(f"{dist:10} run failed\r")
if __name__ == "__main__":
loop = asyncio.get_event_loop()
if len(sys.argv) > 1:
loop.run_until_complete(build_run(sys.argv[1], verbose=True, parallel=8))
else:
loop.run_until_complete(
asyncio.gather(*(build_run(dist) for dist in DISTRIBUTIONS))
)
loop.close()
#!/bin/bash -eux
source /dist
export PROJECT=$1
DO_TEST=true
if [ "$PROJECT" = "hpp-fcl" ]
then
if [[ "$DIST" = "fedora28" || "$DIST" = "fedora31" || "$DIST" = "buster" ]]
then DO_TEST=false
fi
fi
build() {
git clone --recursive --depth 1 --branch topic/multipy "https://github.com/nim65s/$PROJECT.git"
mkdir "$PROJECT"/build{,2,3}
cd "/src/$PROJECT/build" || exit 1
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=11 -DINSTALL_DOCUMENTATION=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/openrobots -DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_PYTHON_INTERFACE=OFF ..
make -sj"$CTEST_PARALLEL_LEVEL"
DO_TEST && make test
make install
if [ "$DIST" != "20.04" ]
then
cd "../build2" || exit 1
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=11 -DINSTALL_DOCUMENTATION=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/openrobots -DCMAKE_INSTALL_LIBDIR=lib \
-DPYTHON_EXECUTABLE="/usr/bin/python2" -DPYTHON_STANDARD_LAYOUT=ON -DINSTALL_PYTHON_INTERFACE_ONLY=ON ..
make -sj"$CTEST_PARALLEL_LEVEL"
DO_TEST && make test
make install
fi
cd "../build3" || exit 1
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=11 -DINSTALL_DOCUMENTATION=OFF \
-DCMAKE_INSTALL_PREFIX=/opt/openrobots -DCMAKE_INSTALL_LIBDIR=lib \
-DPYTHON_EXECUTABLE="/usr/bin/python3" -DPYTHON_STANDARD_LAYOUT=ON -DINSTALL_PYTHON_INTERFACE_ONLY=ON ..
make -sj"$CTEST_PARALLEL_LEVEL"
DO_TEST && make test
make install
}
if [ "$DIST" = "centos7" ]
then export PATH=/usr/lib64/python2.7/site-packages/cmake/data/bin:$PATH
fi
build "$PROJECT"
File moved
#!/bin/bash -eux
pacman -Sy --noconfirm python2-numpy
#!/bin/bash -eux
BOOST_VERSION="1_74_0"
yum install -q -y which wget
yum erase -q -y boost-libs boost-devel boost-python36-devel python2-numpy numpy
wget -q https://dl.bintray.com/boostorg/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2
tar xf boost_${BOOST_VERSION}.tar.bz2
cd boost_${BOOST_VERSION}
./bootstrap.sh --prefix=/usr/local
patch << 'EOF'
--- project-config.jam 2020-08-20 11:38:06.896289775 +0000
+++ project-confi.jam 2020-08-20 11:37:48.052239309 +0000
@@ -18,7 +18,8 @@
import python ;
if ! [ python.configured ]
{
- using python : 2.7 : "/usr" ;
+ using python : 2.7 : /usr/bin/python2 : /usr/include/python2.7 : /usr/lib ;
+ using python : 3.6 : /usr/bin/python3 : /usr/include/python3.6m : /usr/lib ;
}
# List of --with-<library> and --without-<library>
EOF
./b2 install link=shared python=2.7,3.6
echo /opt/openrobots/lib/python2.7/site-packages/ > /usr/lib/python2.7/site-packages/robotpkg.pth
python2 -m pip install -U numpy
python3 -m pip install -U numpy
make -C ~/robotpkg/graphics/urdfdom install
rm -rf /src/boost_${BOOST_VERSION}
#!/usr/bin/env python
import sys
import crocoddyl
import curves
import eigenpy
import example_robot_data
import hppfcl
import multicontact_api
import numpy as np
import pinocchio
import tsid
with open("/dist") as f:
dist = f.read()
if "20.04" in dist:
print("*" * 74)
print("{: <6s}".format(sys.version.split()[0]))
print(eigenpy.Quaternion(1, 2, 3, 4).norm())
print(hppfcl.Capsule(2, 3).computeVolume())
print(pinocchio.SE3.Identity().inverse())
print(example_robot_data.load("talos").model.nq)
URDF = "/talos_data/robots/talos_left_arm.urdf"
PATH = example_robot_data.robots_loader.getModelPath(URDF)
print(tsid.RobotWrapper(PATH + URDF, [PATH], False).na)
print(crocoddyl.ActionModelUnicycle().nr)
print(
curves.bezier(
np.array([[1, 2, 3], [4, 5, 6], [4, 5, 6], [4, 5, 6], [4, 5, 6]]), 0.2, 1.5
).dim()
)
print(multicontact_api.ContactModel().mu)
#!/bin/bash -eu
source /dist
if [ "$DIST" = "archlinux" ]
then echo /opt/openrobots/lib/python2.7/site-packages/ > /usr/lib/python2.7/site-packages/robotpkg.pth
fi
if [ "$DIST" = "centos7" ]
then export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
fi
if [ "$DIST" != "20.04" ]
then python2 /run.py
fi
python3 /run.py