Commit 04bccef8 authored by Moritz Scheuren's avatar Moritz Scheuren
Browse files

added link to documentation

parent 65de7a9f
# HemiStereo ROS2
This repository provides a ROS2 node to publish the point cloud and image of the [Hemistereo NX](https://3dvisionlabs.com/hs-nx/).
## Getting Started
We provide ready to use Docker files for building the application.
You can run the ROS2 Node on the [Hemistereo NX](https://3dvisionlabs.com/hs-nx/).
Alternatively, Node should be executable on any other Linux system that meets the following requirements:
* Docker version 19.03 or later.
* ROS2 supported the architecture.
* Hemistereo NX is reachable over the network.
We provide prebuild images for `arm64` and `amd64` over [Docker Hub](https://hub.docker.com/repository/docker/3dvl/hemistereo-ros2).
To get started you need the [Docker Engine](https://docs.docker.com/engine/install/) and optional but recommended [Docker Compose](https://docs.docker.com/compose/install/), both should be present at the Hemistereo NX, if you use another PC you have to install them.
Follow these instructions to get the one ROS2 node running:
1. Clone this Repo
```console
git clone --recursive https://git.3dvisionlabs.com/3dvisionlabs/software/hemistereo/apps/stereo/ros2.git
```
2. Switch to the cloned directory
```console
cd ros2
```
3. Adjust the IP address and port to your environment. If the ROS2 node is running on the Hemistereo NX, the default value `localhost:8888` should work. Edit the config/hemistereo.yaml regarding your needs.
```console
nano config/hemistereo.yaml
```
4. Run:
```console
docker-compose pull
docker-compose up -d
```
Or if you do not want to use Docker Compose:
Docker volume path must be absolute, adjust `` `pwd` ``.
```console
docker pull 3dvl/hemistereo-ros2:latest
docker run -it \
--network host \
-v `pwd`/config/hemistereo.yaml:/opt/hemistereo/config/hemistereo.yaml \
3dvl/hemistereo-ros2:latest
```
## Using
### Available topics:
| topics | message type |
|--------|-------------|
| /hemistereo/image | sensor_msgs/msg/Image |
| /hemistereo/pointcloud | sensor_msgs/msg/PointCloud2 |
| /hemistereo/distancecolored | sensor_msgs/msg/Image |
### rviz2
Launch [rviz2](https://index.ros.org/r/rviz/#foxy) on any PC at the same network.
Copy hemistereo.rviz out of this repository.
File -> Open Config -> hemistereo.rviz
### Parameters and configuration
The ROS2 parameters are mostly generated automatically from the parameters provided by Hemistereo NX.
#### List parameters
To display all available parameters, use the following command:
```console
ros2 param list
```
#### Describe parameters
In order to get a more detailed description of the parameter and existing constraints please use:
```console
ros2 param describe node_name parameter_names
```
For example:
```console
$ ros2 param describe hemistereo ip_address
Parameter name: ip_address
Type: string
Description: IP address and port on which the Hemistereo sensor is reached, default is "localhost:8888".
Constraints:
Read only: true
Additional constraints: Changing the IP address and port is only possible by restarting, please use "config/hemistereo.yaml" to do so.
```
#### Get parameters
If you wish to read a parameter use:
```console
ros2 param get node_name parameter_name
```
For example:
```console
ros2 param get hemistereo stereo_matching_image_width
```
#### Set parameters
To change a parameter you can use:
```console
ros2 param set node_name parameter_name value
```
For example:
```console
ros2 param set hemistereo stereo_matching_image_width 1024
```
Alternatively, many of the settings can be easily accessed via the [HemiStereo Viewer](https://3dvisionlabs.com/downloads/).
#### Save your configuration
If you want to save your configuration, use:
```console
ros2 param dump hemistereo
```
This will save your confirmation to `./hemistereo.yaml`, which you can use to replace the `config/hemistereo.yaml`.
### Logging
[ROS2 provices serveral log levels](https://index.ros.org/doc/ros2/Concepts/Logging/).
The Hemistereo ROS2 node uses the `WARN` log level by default, if you want to change this you have to change the following line in the docker file and rebuild the docker image:
```console
ENTRYPOINT . install/setup.bash \
&& ros2 run hemistereo publisher --ros-args --params-file /opt/hemistereo/config/hemistereo.yaml --log-level warn
```
## Building
If you want to build the docker image yourself:
1. Clone this Repo
```console
git clone --recursive https://git.3dvisionlabs.com/3dvisionlabs/software/hemistereo/apps/stereo/ros2.git
```
2. Switch to the cloned directory
```console
cd ros2
```
3. Run:
```console
docker-compose build
```
Or:
```console
docker build -t 3dvl/hemistereo-ros2:latest .
```
\ No newline at end of file
https://docs.3dvisionlabs.com/hs-nx/software/ros.html
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment