Skip to content

Commit

Permalink
Merge pull request #45 from boschglobal/main-v1.8
Browse files Browse the repository at this point in the history
Main v1.8
  • Loading branch information
syyuen committed Oct 30, 2023
2 parents 8bf9a58 + 00a806f commit 8696169
Show file tree
Hide file tree
Showing 22 changed files with 617 additions and 124 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_rolling.yml
Expand Up @@ -8,22 +8,22 @@ on:
schedule:
# Run once per day to detect broken dependencies.
- cron: '33 6 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: [ ubuntu-20.04, windows-latest, macOS-latest ]
os: [ ubuntu-22.04 ]
ros_distribution: [ rolling ]
include:
- ros_distribution: "rolling"
os: "ubuntu-22.04"
runs-on: ${{ matrix.os }}
steps:
- uses: ros-tooling/setup-ros@v0.3
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- uses : ros-tooling/action-ros-ci@v0.2
- uses : ros-tooling/action-ros-ci@v0.3
with:
package-name: bosch_locator_bridge
vcs-repo-file-url: ''
Expand All @@ -33,5 +33,5 @@ jobs:
"build": {
"mixin": ["coverage-gcc"]
}
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
@@ -1,4 +1,4 @@
name: "Build action (utils): Galactic"
name: "Build action (utils): Humble"

on:
push:
Expand All @@ -16,14 +16,13 @@ jobs:
strategy:
fail-fast: false
matrix:
# os: [ ubuntu-20.04, windows-latest, macOS-latest ]
os: [ ubuntu-20.04 ]
ros_distribution: [ galactic ]
os: [ ubuntu-22.04 ]
ros_distribution: [ humble ]
steps:
- uses: ros-tooling/setup-ros@v0.5
- uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- uses : ros-tooling/action-ros-ci@v0.2
- uses : ros-tooling/action-ros-ci@v0.3
with:
package-name: bosch_locator_bridge_utils
vcs-repo-file-url: ''
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@
[![Build action: Galactic](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_galactic.yml/badge.svg?branch=main)](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_galactic.yml)
[![Build action: Humble](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_humble.yml/badge.svg?branch=main)](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_humble.yml)
[![Build action: Rolling](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_rolling.yml/badge.svg?branch=main)](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_rolling.yml)
[![Build action (utils): Galactic](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_utils_galactic.yml/badge.svg?branch=main)](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_utils_galactic.yml)
[![Build action (utils): Humble](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_utils_humble.yml/badge.svg?branch=main)](https://github.com/boschglobal/locator_ros_bridge/actions/workflows/build_utils_humble.yml)

---
**Level Up Your Mobile Robots. Rexroth ROKIT Locator – Your Easy-to-Use Laser Localization Software**
Expand Down
4 changes: 4 additions & 0 deletions bosch_locator_bridge/CMakeLists.txt
Expand Up @@ -36,6 +36,8 @@ find_package(Poco REQUIRED COMPONENTS Foundation Net JSON)

set(msg_files
"msg/ClientControlMode.msg"
"msg/ClientExpandMapOverwriteZoneInformation.msg"
"msg/ClientExpandMapVisualization.msg"
"msg/ClientGlobalAlignLandmarkObservationNotice.msg"
"msg/ClientGlobalAlignLandmarkVisualizationInformation.msg"
"msg/ClientGlobalAlignVisualization.msg"
Expand All @@ -47,10 +49,12 @@ set(msg_files

set(srv_files
"srv/ClientConfigGetEntry.srv"
"srv/ClientExpandMapEnable.srv"
"srv/ClientMapList.srv"
"srv/ClientMapSend.srv"
"srv/ClientMapSet.srv"
"srv/ClientMapStart.srv"
"srv/ClientRecordingSetCurrentPose.srv"
"srv/StartRecording.srv"
"srv/ServerMapGetImageWithResolution.srv"
"srv/ServerMapList.srv"
Expand Down
141 changes: 103 additions & 38 deletions bosch_locator_bridge/README.md
Expand Up @@ -83,6 +83,38 @@ When you are done, you can stop the localization with

ros2 service call /bridge_node/stop_localization std_srvs/srv/Empty

#### Map Expansion

1. Record and build the prior map (map name: priormap) as usual.
2. Start localization on this prior map and move until the system is localized.
3. Make a note of the pose and do not move
4. Enable map expansion
```
rosservice call /bridge_node/enable_map_expansion "prior_map_name: priormap"
```
5. Start visual recording and use the following to visualize the prior map
```
rosrun rviz rviz -d `rospack find bosch_locator_bridge`/config/locator_bridge_visual_recording_with_prior_map.rviz
```
6. Use the pose in step 3 to set the current pose in the recording
```
rosservice call /bridge_node/recording_set_current_pose "pose:
x: -0.357
y: 32.3
theta: -0.23"
```
7. Drive around to record the new area as an extension
8. Stop visual recording
9. Start mapping with the recording including the initial pose (map expansion is still enabled)
```
rosrun rviz rviz -d `rospack find bosch_locator_bridge`/config/locator_bridge_map_creation_with_prior_map.rviz
```
10. Disable the map expansion
```
rosservice call /bridge_node/disable_map_expansion
```


## Nodes

### bridge_node
Expand All @@ -97,150 +129,179 @@ To correctly forward the laser scan data, it is important that `ClientSensor.las

* **`/scan`** ([sensor_msgs/msg/LaserScan])

The laserscan topic of the first laser to translate and forward to the ROKIT Locator.
The laserscan topic of the first laser to translate and forward to the ROKIT Locator.

* **`/scan2`** ([sensor_msgs/msg/LaserScan])

The laserscan topic of the second laser to translate and forward to the ROKIT Locator.
The laserscan topic of the second laser to translate and forward to the ROKIT Locator.

* **`/odom`** ([nav_msgs/msg/Odometry])

The odometry topic to translate and forward to the ROKIT Locator. Only used when `enable_odometry` is set to `true`.
The odometry topic to translate and forward to the ROKIT Locator. Only used when `enable_odometry` is set to `true`.

* **`/initialpose`** ([geometry_msgs/msg/PoseWithCovarianceStamped])

Set a seed pose to help localization.
RViz by default sends a message of this type and topic when the user clicks on the "2D Pose Estimate" button in the toolbar.
Set a seed pose to help localization.
RViz by default sends a message of this type and topic when the user clicks on the "2D Pose Estimate" button in the toolbar.

#### Published Topics

* **`/bridge_node/client_control_mode`** ([bosch_locator_bridge/msg/ClientControlMode](./msg/ClientControlMode.msg))

The state of the different modules. See ROKIT Locator API Documentation, chapter 5 "Client Control Mode".
The state of the different modules. See ROKIT Locator API Documentation, chapter 5 "Client Control Mode".

##### Map Creation

* **`/bridge_node/client_map_map`** ([sensor_msgs/msg/PointCloud2])

The map used for localization as point cloud.
The map used for localization as point cloud.

* **`/bridge_node/client_map_visualization`** ([bosch_locator_bridge/msg/ClientMapVisualization](./msg/ClientMapVisualization.msg))

Describes the current state of the map creation mode.
Describes the current state of the map creation mode.

* **`/bridge_node/client_map_visualization/pose`** ([geometry_msgs/msg/PoseStamped])

The current pose of the laser sensor during the map creation mode.
The current pose of the laser sensor during the map creation mode.

* **`/bridge_node/client_map_visualization/scan`** ([sensor_msgs/msg/PointCloud2])

The current laser scan worked on during the map creation mode.
The current laser scan worked on during the map creation mode.

* **`/bridge_node/client_map_visualization/path_poses`** ([geometry_msgs/msg/PoseArray])

The path of the laser sensor during the map creation mode.
The path of the laser sensor during the map creation mode.

* **`/bridge_node/client_global_align_visualization`** ([bosch_locator_bridge/msg/ClientGlobalAlignVisualization](./msg/ClientGlobalAlignVisualization.msg))

Information on global alignment landmarks and their observations.
Information on global alignment landmarks and their observations.

* **`/bridge_node/client_global_align_visualization/poses`** ([geometry_msgs/msg/PoseArray])

Previous poses visited by the laser sensor.
Previous poses visited by the laser sensor.

* **`/bridge_node/client_global_align_visualization/landmarks/poses`** ([geometry_msgs/msg/PoseArray])

Poses of the estimated landmarks.
Poses of the estimated landmarks.

##### Map Recording

* **`/bridge_node/client_recording_map`** ([sensor_msgs/msg/PointCloud2])

The map as point cloud during the recording mode.
The map as point cloud during the recording mode.

* **`/bridge_node/client_recording_visualization`** ([bosch_locator_bridge/msg/ClientRecordingVisualization](./msg/ClientRecordingVisualization.msg))

Visualization information for the recording process.
Visualization information for the recording process.

* **`/bridge_node/client_recording_visualization/pose`** ([geometry_msgs/msg/PoseStamped])

Latest estimated pose of the laser sensor during the recording process.
Latest estimated pose of the laser sensor during the recording process.

* **`/bridge_node/client_recording_visualization/scan`** ([sensor_msgs/msg/LaserScan])

Latest processed laser scan during the recording process.
Latest processed laser scan during the recording process.

* **`/bridge_node/client_recording_visualization/path_poses`** ([geometry_msgs/msg/PoseArray])

Latest path of the laser sensor during the recording process.
Latest path of the laser sensor during the recording process.

##### Localization

* **`/bridge_node/client_localization_map`** ([sensor_msgs/msg/PointCloud2])

Map as point cloud used during localization.
Map as point cloud used during localization.

* **`/bridge_node/client_localization_visualization`** ([bosch_locator_bridge/msg/ClientLocalizationVisualization](./msg/ClientLocalizationVisualization.msg))

Visualization information for the localization process.
Visualization information for the localization process.

* **`/bridge_node/client_localization_visualization/pose`** ([geometry_msgs/msg/PoseStamped])

Current estimated pose during localization process.
Current estimated pose during localization process.

* **`/bridge_node/client_localization_visualization/scan`** ([sensor_msgs/msg/PointCloud2])

Currently processed laser scan during localization.
Currently processed laser scan during localization.

* **`/bridge_node/client_localization_pose`** ([bosch_locator_bridge/msg/ClientLocalizationPose](./msg/ClientLocalizationPose.msg))

Localization information.
Localization information.

* **`/bridge_node/client_localization_pose/pose`** ([geometry_msgs/msg/PoseStamped])

6 DoF pose of the laser sensor during localization process.
6 DoF pose of the laser sensor during localization process.

* **`/bridge_node/client_localization_pose/lidar_odo_pose`** ([geometry_msgs/msg/PoseStamped])

The current pose of the laser sensor, given in a relative reference frame.
The current pose of the laser sensor, given in a relative reference frame.

##### Map Expansion

* **`/bridge_node/client_expandmap_priormap`** ([sensor_msgs/PointCloud2])

Prior map as point cloud.

* **`/bridge_node/client_expandmap_visualization`** ([bosch_locator_bridge/ClientExpandMapVisualization](./msg/ClientExpandMapVisualization.msg))

Map expansion information, e.g. zones.

#### Services

* **`/bridge_node/get_config_entry`** ([bosch_locator_bridge/srv/ClientConfigGetEntry](./srv/ClientConfigGetEntry.srv))

Returns the value of the config entry with the given name.
Returns the value of the config entry with the given name.

* **`/bridge_node/start_visual_recording`** ([bosch_locator_bridge/srv/StartRecording](./srv/StartRecording.srv))

Starts the visual map recording under the given map name.
Starts the visual map recording under the given map name.

* **`/bridge_node/stop_visual_recording`** ([std_srvs/srv/Empty])

Stops visual map recording.
Stops visual map recording.

* **`/bridge_node/start_map`** ([bosch_locator_bridge/srv/ClientMapStart](./srv/ClientMapStart.srv))

Start to create a map from the data contained within a recording.
Start to create a map from the data contained within a recording.

* **`/bridge_node/stop_map`** ([std_srvs/srv/Empty])

Stop map creation.
Stop map creation.

* **`/bridge_node/send_map`** ([bosch_locator_bridge/srv/ClientMapSend](./srv/ClientMapSend.srv))

Send the given map to the map server. This is a prerequisite so that the map can be used for localization.
Send the given map to the map server. This is a prerequisite so that the map can be used for localization.

* **`/bridge_node/set_map`** ([bosch_locator_bridge/srv/ClientMapSet](./srv/ClientMapSet.srv))

Set the given map to be used for localization.
Set the given map to be used for localization.

* **`/bridge_node/start_localization`** ([std_srvs/srv/Empty])

Start self-localization within the map.
Start self-localization within the map.

* **`/bridge_node/stop_localization`** ([std_srvs/srv/Empty])

Stop self-localization within the map.
Stop self-localization within the map.

* **`/bridge_node/enable_map_expansion`** ([bosch_locator_bridge/ClientExpandMapEnable](./srv/ClientExpandMapEnable.srv))

Enable the map expansion

* **`/bridge_node/disable_map_expansion`** ([std_srvs/Empty])

Disable the map expansion

* **`/bridge_node/recording_set_current_pose`** ([bosch_locator_bridge/ClientRecordingSetCurrentPose](./srv/ClientRecordingSetCurrentPose.srv))

Set the current pose in the recording.
```
rosservice call /bridge_node/recording_set_current_pose "pose:
x: -0.357
y: 32.3
theta: -0.23"
```


### server_bridge_node

Expand All @@ -261,11 +322,11 @@ where

* **`/server_bridge_node/get_map_with_resolution`** ([bosch_locator_bridge/srv/ServerMapGetImageWithResolution](./srv/ServerMapGetImageWithResolution.srv))

Stores the requested map in a pair of files (YAML and PNG), as is usual with ROS.
Stores the requested map in a pair of files (YAML and PNG), as is usual with ROS.

* **`/server_bridge_node/list_server_maps`** ([bosch_locator_bridge/srv/ServerMapList](./srv/ServerMapList.srv))

Returns list of maps on map server.
Returns list of maps on map server.

## Caveats

Expand All @@ -288,7 +349,11 @@ To avoid this, make sure `LaserScan` messages are sent to the bridge before swit

## Support of earlier versions of ROKIT Locator

If you have version 1.5 of ROKIT Locator, checkout the corresponding tag:
If you have version 1.6 of ROKIT Locator, checkout the corresponding tag:

git checkout 2.1.9 -b main-v1.5

And if you have version 1.5:

git checkout 2.1.8 -b main-v1.5

Expand Down

0 comments on commit 8696169

Please sign in to comment.