Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Merge requests
!305
WIP: Resolve "Do not use default YAML params"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
WIP: Resolve "Do not use default YAML params"
244-yaml-params-with-spaces-not-underscores
into
devel
Overview
2
Commits
24
Pipelines
14
Changes
1
Closed
Joan Solà Ortega
requested to merge
244-yaml-params-with-spaces-not-underscores
into
devel
5 years ago
Overview
2
Commits
24
Pipelines
14
Changes
1
Expand
Closes
#244 (closed)
Edited
5 years ago
by
Joan Solà Ortega
0
0
Merge request reports
Viewing commit
ceb1af00
Prev
Next
Show latest version
1 file
+
28
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ceb1af00
New macro for createAutoConf()
· ceb1af00
Joan Solà Ortega
authored
5 years ago
include/core/sensor/sensor_base.h
+
28
−
0
Options
@@ -18,6 +18,34 @@ class StateBlock;
namespace
wolf
{
/*
* Macro for defining Autoconf sensor creator.
*
* In order to use this macro, the derived sensor class, SensorClass, must have a constructor available like so:
*
* SensorClass(const VectorXs & _extrinsics, const IntrinsicsClassPtr _intrinsics);
*
*/
#define WOLF_CREATE_SENSOR_AUTO(SensorClass, IntrinsicsClass, ExtrinsicsSize) \
static SensorBasePtr createAutoConf(const std::string& _unique_name, const ParamsServer& _server) \
{ \
Eigen::VectorXs extrinsics = _server.template getParam<Eigen::VectorXs>(_unique_name + "/extrinsic/pose"); \
\
assert(extrinsics.size() == ExtrinsicsSize && "Bad extrinsics vector length."); \
\
IntrinsicsClass##Ptr params = std::make_shared<IntrinsicsClass>(_unique_name, _server); \
\
SensorClass##Ptr sensor = std::make_shared<SensorClass>(extrinsics, params); \
\
sensor ->setName(_unique_name); \
\
return sensor; \
}
/** \brief base struct for intrinsic sensor parameters
*
* Derive from this struct to create structs of sensor intrinsic parameters.
Loading