Skip to content

Commit

Permalink
Merge branch 'release1.1.0' into 'master'
Browse files Browse the repository at this point in the history
Update to ifm3d 1.2.6

See merge request syntron/support/csr/ifm3d/ifm3d-ros!28
  • Loading branch information
desengph committed Aug 25, 2023
2 parents 1b1766a + 1f05f3d commit 4e4cc56
Show file tree
Hide file tree
Showing 36 changed files with 1,535 additions and 1,122 deletions.
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
#editor temp/backup files
*~
*.swp

## VSCode and Python
.DS_Store
.huskyrc.json
out
log.log
**/node_modules
*.pyc
*.vsix
**/.vscode/.ropeproject/**
**/testFiles/**/.cache/**
*.noseids
.nyc_output
.vscode-test
__pycache__
npm-debug.log
**/.mypy_cache/**
!yarn.lock
coverage/
cucumber-report.json
**/.vscode-test/**
**/.vscode test/**
**/.vscode-smoke/**
**/.venv*/
port.txt
precommit.hook
pythonFiles/lib/**
debug_coverage*/**
languageServer/**
languageServer.*/**
bin/**
obj/**
.pytest_cache
tmp/**
.python-version
.vs/
test-results*.xml
xunit-test-results.xml
build/ci/performance/performance-results.json
!build/
debug*.log
debugpy*.log
pydevd*.log
nodeLanguageServer/**
nodeLanguageServer.*/**
dist/**
# translation files
*.xlf
package.nls.*.json
l10n/
35 changes: 34 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,46 @@
Changelog for package ifm3d-ros
^^^^^^^^^^^^^^^^^^^^^^^^^

1.1 (unreleased)
===============

1.1.0
-----
* Update camera nodelet for ifm3d >= v1.2.3
* Switch from looped image retrieval to callback based image retrieval
* Updated schema mask handling: uint based schema mask replaced with default 2D and 3D bufferID based lists
Between ifm3d API version 0.93 and 1.1 the internal handling of the amplitude and distance image and the point cloud has changed: The previously automatically applied masking based on the confidence image is no longer applied. As a result, more image pixels are displayed as valid pixels.
If you want to apply a binary mapping to these images, use the confidence image as provided in the ROS node and apply the mask `confidence&1` for backward compatibility.

* Nodelet interface changes:
* additional parameters:
* xyz_image_stream: boolean value - Enable / disable publishing and streaming of point cloud topic / messages.
* confidence_image_stream: boolean value - Enable / disable publishing and streaming of confidence image topic / messages
* radial_distance_image_stream: boolean value - Enable / disable publishing and streaming of radial distance image topic / messages
* radial_distance_noise_stream: boolean value - Enable / disable publishing and streaming of radial distance noise image topic / messages
* amplitude_image_stream: boolean value - Enable / disable publishing and streaming of amplitude image topic / messages
* extrinsic_image_stream: boolean value - Enable / disable publishing and streaming of extrinsics topic / messages
* intrinsic_image_stream: boolean value - Enable / disable publishing and streaming of intrinsics topic / messages
* rgb_image_stream: boolean value - Enable / disable publishing and streaming of 2D RGB image topic / messages
* Updated the default launch files for 2D RGB / 3D TOF cameras accordingly
* Added support for JSON schema dump service
* ifm3d-ros logging:
* Reduced level of logging messages
* Changed default behavior of info log messages: NODELET_INFO_STREAM replaced by NODELET_INFO_ONCE
* Removed:
* Compressed amplitude stream: only amplitude publisher is used
* Unit vector publisher
* Robustness improvements:
* Only publish data to image streams if API frames include the corresponding image data

1.0
===

1.0.2
-----
* Fix the IP parameter that was not being used

1.0.1
1.0.1
-----

* Removed dependency to OpenCV and PCL.
Expand Down
51 changes: 33 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
# ifm3d-ros

## Release versions
*This documentation is formatted to be read on www.ifm3d.com.*

warning:: Note that the `master` branch is generally in a work in progress, and you probably want to use a tagged [release version](https://github.com/ifm/ifm3d-ros/releases) for production.
:::{note} The ifm3d-ros package has had major changes recently. Please be aware that this might cause problems on your system for building pipelines based on our old build instructions.
:::

## ifm3d-ros for the O3R
## Compatibility Matrix
:::{warning} Note that the `master` branch is generally in a work in progress, and you probably want to use a tagged [release version](https://github.com/ifm/ifm3d-ros/releases) for production.
:::

| **ifm3d-ros version** | **ifm3d version** | **embedded O3R FW version** | **ROS distribution(s)** |
| --------------------- | ----------------- | --------------------------- | ----------------------- |
| 1.1.1 | 1.2.6 | 1.0.14 | ROS Noetic |
| 1.1.0 (unreleased) | 1.2.3 | 1.0.x | ROS Noetic |
| 1.0.1 | 0.93.0 | 0.14.23 | ROS Noetic |
| 1.0.0 | 0.91.0 | 0.14.23 | ROS Noetic |


### Internal ifm3d-ros subpackage version structure
Please see the internal subpackage version structure for a known `ifm3d-ros version`.

| **ifm3d-ros version** | **ifm3d_ros_driver** | **ifm3d_ros_msgs** | **ifm3d_ros_examples** |
| --------------------- | -------------------- | ------------------ | ---------------------- |
| 1.1.1 | 1.1.1 | 0.2.0 | 0.2.0 |
| 1.1.0 (unreleased) | 1.1.0 | 0.2.0 | 0.2.0 |
| 1.0.1 | 1.0.1 | 0.1.0 | 0.1.0 |
| 1.0.0 | 0.7.0 | 0.1.0 | 0.1.0 |

**NOTE: The ifm3d-ros package has had major changes recently. Please be aware that this might cause problems on your system for building pipelines based on our old build instructions.**
We tried to ensure backward compatibility where ever possible. If you find any major breaks, please let us know.

## Changelogs
+ ifm3d-ros: For changes between on the ifm3d-ros node source code, please see the respective information in the [CHANGELOG](CHANGELOG.rst).
+ ifm3d: For changes between on the ifm3d API source code, please see the respective information in the [ifm3d CHANGELOG](https://github.com/ifm/ifm3d/blob/main/ChangeLog.md).
+ O3R firmware: For changes between on the different FW versions, please see the respective information in the [FW release notes](https://ifm3d.com/documentation/Firmware/index.html).


## ifm3d-ros for the O3R

ifm3d-ros is a wrapper around [ifm3d](ifm3d/doc/sphinx/content/README:ifm3d%20Overview) enabling the usage of the O3R camera platform (ifm ToF cameras) from within [ROS](http://ros.org) software systems.
**Please make sure to use version {{ ifm3d_ros_latest_version }} or above for O3R compatibility.**

![rviz1](ifm3d_ros_driver/doc/figures/O3R_merged_point_cloud.png)

## Software Compatibility Matrix

|**ifm3d-ros version**|**ifm3d version**|**ROS distribution(s)**|
| ------------ | ------------ | ------------ |
| 1.0.0 | 0.91.0 | Noetic |
| 1.0.1 | 0.93.0 | Noetic |
**NOTE** The confidence image handling inside the ifm3d API has changed which results in more valid pixels - for more information see the [Release Notes](Release_notes.md)

### Internal ifm3d-ros subpackage version structure
Please see the internal subpackage version structure for a known `ifm3d-ros version`.

|**ifm3d-ros version**|**ifm3d_ros_driver**|**ifm3d_ros_msgs**|**ifm3d_ros_examples**|
| ------------ | ------------ | ------------ | ------------ |
| 1.0.0 | 0.7.0 | 0.1.0 | 0.1.0 |
| 1.0.1 | 1.0.1 | 0.1.0 | 0.1.0 |

## Organization of the software

Expand All @@ -47,5 +61,6 @@ Preparing your system <ifm3d_ros_driver/doc/noetic>
Installing the ifm3d-ros node <ifm3d_ros_driver/doc/building>
Build for distributed systems <ifm3d_ros_driver/doc/distributed_build>
:::

## LICENSE
Please see the file called [LICENSE](LICENSE).
14 changes: 14 additions & 0 deletions Release_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Release notes ifm3d-ros

## Dependent software and firmware release notes and changelogs
+ ifm3d-ros: For changes between on the ifm3d-ros node source code, please see the respective information in the [CHANGELOG](CHANGELOG.rst).
+ ifm3d: For changes between on the ifm3d API source code, please see the respective information in the [ifm3d CHANGELOG](https://github.com/ifm/ifm3d/blob/main/ChangeLog.md).
+ O3R firmware: For changes between on the different FW versions, please see the respective information in the [FW release notes](https://ifm3d.com/documentation/Firmware/index.html).



## ifm3d-ros 1.1
The ifm3d-ros node version 1.1 depends on ifm3d API 1.2.6, as can be seen in the [compatibility matrix](README.md#software-compatibility-matrix).

Between ifm3d API version 0.93 and 1.1 the internal handling of the amplitude and distance image and the point cloud has changed: The previously automatically applied masking based on the confidence image is no longer applied. As a result, more image pixels are displayed as valid pixels.
If you want to apply a binary mapping to these images, use the confidence image as provided in the ROS node and apply the mask `confidence&1` for backward compatibility.
96 changes: 96 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#############################################
# Copyright 2023-present ifm electronic, gmbh
# SPDX-License-Identifier: Apache-2.0
#############################################
ARG BASE_IMAGE
ARG BUILD_IMAGE_TAG
ARG FINAL_IMAGE_TAG
FROM ${BASE_IMAGE}:${BUILD_IMAGE_TAG} AS build
ARG IFM3D_VERSION
ARG IFM3D_ROS_REPO
ARG IFM3D_ROS_BRANCH
ARG ARCH
ARG UBUNTU_VERSION

# Create the ifm user
RUN id ifm 2>/dev/null || useradd --uid 30000 --create-home -s /bin/bash -U ifm
WORKDIR /home/ifm

# Dependencies for both ifm3d and ifm3d-ros2
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git \
jq \
libxmlrpc-c++8-dev \
libproj-dev \
build-essential \
coreutils \
cmake \
wget \
libssl-dev \
libgoogle-glog-dev \
libgoogle-glog0v5 \
python3-rosdep

# Install ifm3d using the deb files
RUN mkdir /home/ifm/ifm3d
ADD https://github.com/ifm/ifm3d/releases/download/v${IFM3D_VERSION}/ifm3d-ubuntu-${UBUNTU_VERSION}-${ARCH}-debs_${IFM3D_VERSION}.tar /home/ifm/ifm3d
RUN cd /home/ifm/ifm3d &&\
tar -xf ifm3d-ubuntu-${UBUNTU_VERSION}-${ARCH}-debs_${IFM3D_VERSION}.tar && \
dpkg -i *.deb

# Clone and build ifm3d-ros repo
SHELL ["/bin/bash", "-c"]
# RUN mkdir -p /home/ifm/catkin_ws/src && \
# cd /home/ifm/catkin_ws/src && \
# git clone ${IFM3D_ROS_REPO} -b ${IFM3D_ROS_BRANCH} --single-branch
ADD . /home/ifm/catkin_ws/src
RUN cd /home/ifm/catkin_ws && \
rosdep update --rosdistro=${ROS_DISTRO} && \
rosdep install --from-path src -y --ignore-src

RUN cd /home/ifm/catkin_ws && \
source /opt/ros/${ROS_DISTRO}/setup.bash && \
catkin_make

# Multistage build to reduce image size
ARG BASE_IMAGE
FROM ${BASE_IMAGE}:${FINAL_IMAGE_TAG}
# Copy files built in previous stage
COPY --from=build /home/ifm/catkin_ws /home/ifm/catkin_ws
COPY --from=build /home/ifm/ifm3d/*.deb /home/ifm/ifm3d/
WORKDIR /home/ifm

# Install ifm3d and ifm3d-ros2 runtime dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libxmlrpc-c++8v5 \
locales \
sudo \
libssl-dev \
libgoogle-glog0v5 \
libboost-all-dev \
python3-rosdep \
&& rm -rf /var/lib/apt/lists/*

# Install ifm3d
RUN cd /home/ifm/ifm3d &&\
dpkg -i *.deb

RUN cd /home/ifm/catkin_ws && \
apt-get update && \
rosdep init && \
rosdep update --rosdistro=${ROS_DISTRO} && \
rosdep install --from-path src -y --ignore-src

# Setup localisation
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
/usr/sbin/update-locale LANG=en_US.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# NOTE: Make sure to run export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
59 changes: 59 additions & 0 deletions docker/Dockerfile_buildstage_only
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#############################################
# Copyright 2023-present ifm electronic, gmbh
# SPDX-License-Identifier: Apache-2.0
#############################################

ARG BASE_IMAGE
ARG BUILD_IMAGE_TAG
ARG FINAL_IMAGE_TAG
FROM ${BASE_IMAGE}:${BUILD_IMAGE_TAG} AS build
ARG IFM3D_VERSION
ARG IFM3D_ROS_REPO
ARG IFM3D_ROS_BRANCH
ARG ARCH
ARG UBUNTU_VERSION

# Create the ifm user
RUN id ifm 2>/dev/null || useradd --uid 30000 --create-home -s /bin/bash -U ifm
WORKDIR /home/ifm

# Dependencies for both ifm3d and ifm3d-ros2
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git \
jq \
libxmlrpc-c++8-dev \
libproj-dev \
libcurl4 \
libgoogle-glog-dev \
libgoogle-glog0v5 \
build-essential \
coreutils \
cmake \
wget \
libssl-dev \
python3-rosdep

# Install ifm3d using the deb files
RUN mkdir /home/ifm/ifm3d
ADD https://github.com/ifm/ifm3d/releases/download/v${IFM3D_VERSION}/ifm3d-ubuntu-${UBUNTU_VERSION}-${ARCH}-debs_${IFM3D_VERSION}.tar /home/ifm/ifm3d
RUN cd /home/ifm/ifm3d &&\
tar -xf ifm3d-ubuntu-${UBUNTU_VERSION}-${ARCH}-debs_${IFM3D_VERSION}.tar && \
dpkg -i *.deb

SHELL ["/bin/bash", "-c"]
# Manually install ifm3d-ros additional ROS packages: based on noetic-ros-core base image
RUN apt-get update && apt-get install -y \
ros-noetic-tf2-ros \
ros-noetic-tf \
ros-noetic-image-transport

ADD . /home/ifm/catkin_ws/src

RUN cd /home/ifm/catkin_ws && \
source /opt/ros/${ROS_DISTRO}/setup.bash && \
catkin_make --only-pkg-with-deps ifm3d_ros_msgs

RUN cd /home/ifm/catkin_ws && \
source /opt/ros/${ROS_DISTRO}/setup.bash && \
catkin_make --only-pkg-with-deps ifm3d-ros
Loading

0 comments on commit 4e4cc56

Please sign in to comment.