SMACC2
Loading...
Searching...
No Matches
smacc2_client_library
cl_rgb
include
cl_rgb
client_behaviors
cb_survey_table.hpp
Go to the documentation of this file.
1
// Copyright 2026 RobosoftAI Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include <
cl_rgb/client_behaviors/cb_rgb_client_behavior_base.hpp
>
18
#include <
cl_rgb/table_survey.hpp
>
19
20
#include <string>
21
22
namespace
cl_rgb
23
{
24
25
struct
SurveyTableParams
26
{
27
std::string
camera
=
"cam_head"
;
28
BlobParams
blobs
;
29
int
minBlobs
= 0;
// fewer than this is a failure
30
double
waitS
= 5.0;
// wall time to wait for a first image, its calibration and its pose
31
};
32
33
// Looks at the table once and records what lies on it: the blobs of the latest image, each
34
// with its place on the table, its size, its direction and its colour. The result is kept
35
// by CpSceneSurvey. Success when at least minBlobs were found, failure otherwise.
36
class
CbSurveyTable
:
public
CbRgbClientBehaviorBase
37
{
38
public
:
39
explicit
CbSurveyTable
(
const
SurveyTableParams
& params =
SurveyTableParams
());
40
41
void
setParams
(
const
SurveyTableParams
& params) {
params_
= params; }
42
43
void
onEntry
()
override
;
44
void
onExit
()
override
{}
45
46
private
:
47
SurveyTableParams
params_
;
48
};
49
50
}
// namespace cl_rgb
cb_rgb_client_behavior_base.hpp
cl_rgb::CbRgbClientBehaviorBase
Definition
cb_rgb_client_behavior_base.hpp:42
cl_rgb::CbSurveyTable
Definition
cb_survey_table.hpp:37
cl_rgb::CbSurveyTable::onExit
void onExit() override
Definition
cb_survey_table.hpp:44
cl_rgb::CbSurveyTable::params_
SurveyTableParams params_
Definition
cb_survey_table.hpp:47
cl_rgb::CbSurveyTable::onEntry
void onEntry() override
Definition
cb_survey_table.cpp:28
cl_rgb::CbSurveyTable::setParams
void setParams(const SurveyTableParams ¶ms)
Definition
cb_survey_table.hpp:41
cl_rgb::CbSurveyTable::CbSurveyTable
CbSurveyTable(const SurveyTableParams ¶ms=SurveyTableParams())
Definition
cb_survey_table.cpp:23
cl_rgb
Definition
box_fit.hpp:25
cl_rgb::BlobParams
Definition
table_survey.hpp:67
cl_rgb::SurveyTableParams
Definition
cb_survey_table.hpp:26
cl_rgb::SurveyTableParams::blobs
BlobParams blobs
Definition
cb_survey_table.hpp:28
cl_rgb::SurveyTableParams::waitS
double waitS
Definition
cb_survey_table.hpp:30
cl_rgb::SurveyTableParams::camera
std::string camera
Definition
cb_survey_table.hpp:27
cl_rgb::SurveyTableParams::minBlobs
int minBlobs
Definition
cb_survey_table.hpp:29
table_survey.hpp
Generated by
1.12.0