Skip to content

Commit dcf091b

Browse files
authored
Merge pull request #440 from csiro-internal/bugfix/roi-and-docs
Minor bugfixes and docs update Updated merged submodule and changelog. Rod approved over slack.
2 parents ce0d372 + d6f1839 commit dcf091b

7 files changed

Lines changed: 54 additions & 7 deletions

File tree

docs/user/Alignment.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ The use cases are as follows:
55
- FA position: arbitrary or from Spatial Fuel Map.
66
- Align to: nothing, centre of geometry or centre of collimation.
77

8-
First, the position of the FA to go to is either arbitrary (as in: `Go to FA by pose` when `Spatial Fuel Map` is unchecked; `ROI - Square Grid`) or retrieved from the Spatial Fuel Map (as in: `Go to FA by index`; `Go to FA by pose` when `Spatial Fuel Map` is checked; `ROI - List`). Based on these, the following topics are published:
8+
First, the position of the FA to go to is either arbitrary (as in: `Go to FA by pose` when `Spatial Fuel Map` is unchecked; `ROI - Square Grid`) or retrieved from the Spatial Fuel Map (as in: `Go to FA by index`; `Go to FA by pose` when `Spatial Fuel Map` is checked; `ROI - List`). Regardless of what it's based on, this is the target's expected position. Based on these, the following topics are published:
99

1010
- `/rcvd/target_fa/index` (`std_msgs/String`): If FA is in Spatial Fuel Map, this is the index. Otherwise, this starts with `closest`.
1111
- `/rcvd/target_fa/position` (`geometry_msgs/PointStamped`): If FA is in Spatial Fuel Map and this is not provided it is retrieved from SFM. Otherwise, this is the arbitrary position that an FA is expected to be found at.
1212

13-
At the same time, the target position is given as a goal to the local path planning system via the topic `/rcvd/local_goal` (`rasg_nav_msgs/LocalNavigationGoal`). The RCVD moves toward the target position.
13+
At the same time, the target's expected position is given as a goal to the local path planning system via the topic `/rcvd/local_goal` (`rasg_nav_msgs/LocalNavigationGoal`). The RCVD moves toward the target position.
1414

1515
The alignment target is published to `/rcvd/target_fa/align_to` (`std_msgs/String`).
1616

17-
If the RCVD has not been requested to align to anything (`Align to` is `Nothing`) then once it reaches the target position, it is complete.
17+
If the RCVD has not been requested to align to anything (`Align to` is `Nothing`) then once it reaches the target's expected position, it is complete.
1818

1919
If the RCVD has been requested to align to the centre of geometry or collimation, then the Computer Vision (CV) system will try to find the target FA within the Optical Payload image. This is performed by:
2020

@@ -24,7 +24,7 @@ If the RCVD has been requested to align to the centre of geometry or collimation
2424

2525
Locating the grid cell containing the target position is performed by using the following information to transform the target position in metres from the fixed `map` frame into a position in pixels in the `cvd` frame. The following information is used for this:
2626

27-
- Target position (relative to `map` frame).
27+
- Target expected position (relative to `map` frame).
2828
- Global SLAM (pose of `odom` frame origin relative to `map` frame).
2929
- Local SLAM (pose of `slam_base_link` frame origin relative to `odom` frame).
3030
- Optical Payload pose in CV configuration (pose of `cvd` frame origin relative to `slam_base_link` frame).
@@ -37,4 +37,18 @@ Once the target FA has been located within the Optical Payload image, the positi
3737

3838
This position is published to the topic `/rcvd/align_feedback` (`rcvd_msgs/AlignFeedback`).
3939

40-
After the alignment feedback has started to be published, the local path planner will switch to a mode where it uses the feedback to align to the target. Once the magnitude of the feedback has stayed below the required value for the required duration, it is complete.
40+
Once the alignment feedback has started to be published, the local path planner will switch to a mode where it uses the feedback to align to the target. Once the magnitude of the feedback has stayed below the required value for the required duration, it is complete.
41+
42+
## Success on completing the target
43+
44+
Regardless of alignment method, the RCVD has to meet both autonomy thresholds and alignment thresholds to succeed. These are all configured in `Settings > Autonomy`, `Settings > Autonomy - Thresholds/Distances`, `Settings > Autonomy - Timeouts`.
45+
46+
The alignment thresholds are time based.
47+
48+
If the RCVD has been requested to align to nothing, then the goal position is successful when:
49+
50+
- `Settings > Autonomy > Required aligned duration`
51+
52+
If the RCVD has been requested to align to geometry or collimation, then the goal position is successful when:
53+
54+
- `Settings > Autonomy > Max time between alignment`

docs/user/CV.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Primarily, CV is used when aligning to the centre of collimation.
77

88
## <a href="#parameters" id="parameters" name="parameters">Parameters</a>
99

10+
What these parameters mean and how to configure them in a real deployment is outlined in [Tuning.md](./Tuning.md).
11+
1012
<!-- prettier-ignore-start -->
1113

1214
| Parameter | Olkiluoto/2022-08 | Olkiluoto/2022-08 | QCAT/2025-03 | Unknown/2022-11 |
@@ -29,6 +31,22 @@ Primarily, CV is used when aligning to the centre of collimation.
2931
| Luminosity filter size (px) | 100 |
3032
| Pixel size (m) | 0.00046 |
3133

34+
**The values below are not to be used in a real deployment.**
35+
36+
Below are records of CV parameters that are only relevant for testing at CSIRO with fiducial markers.
37+
Grid detection is not used, so grid buffer, grid padding and grid size settings are irrelevant.
38+
FA size and pixel size are the only two that matter in this setup.
39+
40+
| Parameter | big-tags | small-tags |
41+
|-------------------------------:|:-------------|:-------------|
42+
| FA size (m) | 0.06500 | 0.03000 |
43+
| FA grid buffer (m) | 0.00450 | 0.00450 |
44+
| FA grid padding (m) | 0.01500 | 0.01500 |
45+
| FA grid size (m) | 0.12000 | 0.12000 |
46+
| Luminosity filter padding (px) | 5 | 5 |
47+
| Luminosity filter size (px) | 100 | 100 |
48+
| Pixel size (m) | 0.00017 | 0.00017 |
49+
3250
<!-- prettier-ignore-end -->
3351

3452
## <a href="#visualisations" id="visualisations" name="visualisations">Visualisations</a>

src/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ This file is to document the high level changes to the RCVD project from release
2222
### Changed
2323

2424
- Updated `session.py` to forward `fa_size` and `pixel_size` to two topics, CV (original) and camerafirmware (new).
25+
- Updated `docs/user/Alignment.md` and `docs/user/CV.md`.
26+
- Throttles logging output from `HeightmapToCostmap.cpp`.
2527

2628
### Fixed
2729

2830
- Fixed bug where `slamcomms.cpp` was only writing x values for `slam_orientation_euler_scaled`.
31+
- Fixed bug where GoToFA commands would trigger trying to update ROI progress.
32+
- Fixed mistake in log output about ROI Square Grid minimum number of indices.
2933

3034
## 1.18.13 - 2026-04-14
3135

src/heightmap_to_costmap

src/rcvd_executive/src/ROI.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ bool ROI::resetSquareGrid(const Config & config, const rcvd_msgs::Command & comm
322322

323323
void ROI::onAlignFeedback(const rcvd_msgs::AlignFeedback & align_feedback)
324324
{
325+
// Only update if ROI is active
326+
if (!is_active_) {
327+
return;
328+
}
329+
325330
if (
326331
(roi_ != nullptr) && align_feedback.target_fa.has_index &&
327332
(align_feedback.target_fa.align_to.data == align_to_)) {

src/rcvd_launch/scripts/fiducial_cv_node

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ class Config(rcvd_csiro_py.Config):
8484
"debug", default=True, type=bool, help="Execute debug functionality?"
8585
)
8686

87+
# NOTE: fiducial_cv_node does not use grid detection, so grid_buffer, grid_pad and
88+
# grid_size are all irrelevant in this configuration. it's fa_size and pixel_size that
89+
# are significant for testing @ CSIRO
90+
8791
# fmt: off
8892
yield rcvd_csiro_py.Parameter("base_link_frame_id", default="base_link", type=str, help="Dynamic RCVD tf frame id.")
8993
yield rcvd_csiro_py.Parameter("collimation_offset_mean", default=0.01, type=float, help="Offset from FA position to centre of collimation (mean).")
@@ -760,6 +764,8 @@ class Node:
760764
# Annotate command type
761765
self.__vis_img_texts.append("Command type: {}".format(self.__check_command_type()))
762766

767+
# NOTE: fiducial_cv_node does not do grid detection
768+
763769
# Get expected centre of target FA
764770
target_fa_position_in_image = map_to_image(
765771
rcvd_csiro_py.Vec3(target_fa_position_in_map.x, target_fa_position_in_map.y, 0.0)

src/rcvd_ui

0 commit comments

Comments
 (0)