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
Commits
7186f758
Commit
7186f758
authored
5 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Improve creator macros and constructor API
parent
7313164c
No related branches found
No related tags found
1 merge request
!313
WIP: Resolve "Processor constructors and creators requiring a sensor pointer?"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/core/processor/processor_base.h
+4
-6
4 additions, 6 deletions
include/core/processor/processor_base.h
include/core/sensor/sensor_base.h
+4
-2
4 additions, 2 deletions
include/core/sensor/sensor_base.h
src/processor/processor_diff_drive.cpp
+1
-1
1 addition, 1 deletion
src/processor/processor_diff_drive.cpp
with
9 additions
and
9 deletions
include/core/processor/processor_base.h
+
4
−
6
View file @
7186f758
...
@@ -22,15 +22,13 @@ namespace wolf {
...
@@ -22,15 +22,13 @@ namespace wolf {
/*
/*
* Macro for defining Autoconf processor creator.
* Macro for defining Autoconf processor creator.
*
*
* Place a call to this macro inside your class declaration (in the processor_class.h file),
* preferably just after the constructors.
*
* In order to use this macro, the derived processor class, ProcessorClass,
* In order to use this macro, the derived processor class, ProcessorClass,
* must have a constructor available with
one of the following
API
s
:
* must have a constructor available with
the
API:
*
*
* ProcessorClass(const SensorClassPtr _sensor, const ProcessorParamsClassPtr _params);
* ProcessorClass(const SensorClassPtr _sensor, const ProcessorParamsClassPtr _params);
* ProcessorClass(const SensorClassPtr _sensor, const ProcessorParamsBasePtr _params);
* ProcessorClass(const SensorBasePtr _sensor, const ProcessorParamsClassPtr _params);
* ProcessorClass(const SensorBasePtr _sensor, const ProcessorParamsBasePtr _params);
*
* We recommend writing one of such constructors in your derived processors.
*/
*/
#define WOLF_CREATE_PROCESSOR_AUTO(ProcessorClass, ProcessorParamsClass, SensorClass) \
#define WOLF_CREATE_PROCESSOR_AUTO(ProcessorClass, ProcessorParamsClass, SensorClass) \
static ProcessorBasePtr createAutoConf(const std::string& _unique_name, \
static ProcessorBasePtr createAutoConf(const std::string& _unique_name, \
...
...
This diff is collapsed.
Click to expand it.
include/core/sensor/sensor_base.h
+
4
−
2
View file @
7186f758
...
@@ -22,11 +22,13 @@ namespace wolf {
...
@@ -22,11 +22,13 @@ namespace wolf {
/*
/*
* Macro for defining Autoconf sensor creator.
* Macro for defining Autoconf sensor creator.
*
*
* Place a call to this macro inside your class declaration (in the sensor_class.h file),
* preferably just after the constructors.
*
* In order to use this macro, the derived sensor class, SensorClass,
* In order to use this macro, the derived sensor class, SensorClass,
* must have a constructor available with
one of the following
API
s
:
* must have a constructor available with
the
API:
*
*
* SensorClass(const VectorXs & _extrinsics, const IntrinsicsClassPtr _intrinsics);
* SensorClass(const VectorXs & _extrinsics, const IntrinsicsClassPtr _intrinsics);
* SensorClass(const VectorXs & _extrinsics, const IntrinsicsBasePtr _intrinsics);
*
*
* We recommend writing one of such constructors in your derived sensors.
* We recommend writing one of such constructors in your derived sensors.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_diff_drive.cpp
+
1
−
1
View file @
7186f758
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
namespace
wolf
namespace
wolf
{
{
ProcessorDiffDrive
::
ProcessorDiffDrive
(
ProcessorParamsDiffDrivePtr
_params
)
:
ProcessorDiffDrive
::
ProcessorDiffDrive
(
const
ProcessorParamsDiffDrivePtr
_params
)
:
ProcessorOdom2D
(
_params
),
ProcessorOdom2D
(
_params
),
params_prc_diff_drv_selfcal_
(
_params
),
params_prc_diff_drv_selfcal_
(
_params
),
radians_per_tick_
(
0.0
)
// This params needs further initialization. See this->configure(sensor).
radians_per_tick_
(
0.0
)
// This params needs further initialization. See this->configure(sensor).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment