Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vision
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
plugins
vision
Commits
bebdb9ee
Commit
bebdb9ee
authored
5 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Adapt SensorCamera to autoconf
parent
9cd5e893
No related branches found
No related tags found
1 merge request
!24
After 2nd RAL submission
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/vision/sensor/sensor_camera.h
+6
-10
6 additions, 10 deletions
include/vision/sensor/sensor_camera.h
src/sensor/sensor_camera.cpp
+1
-15
1 addition, 15 deletions
src/sensor/sensor_camera.cpp
with
7 additions
and
25 deletions
include/vision/sensor/sensor_camera.h
+
6
−
10
View file @
bebdb9ee
...
@@ -25,11 +25,11 @@ struct ParamsSensorCamera : public ParamsSensorBase
...
@@ -25,11 +25,11 @@ struct ParamsSensorCamera : public ParamsSensorBase
ParamsSensorCamera
(
std
::
string
_unique_name
,
const
ParamsServer
&
_server
)
:
ParamsSensorCamera
(
std
::
string
_unique_name
,
const
ParamsServer
&
_server
)
:
ParamsSensorBase
(
_unique_name
,
_server
)
ParamsSensorBase
(
_unique_name
,
_server
)
{
{
width
=
_server
.
getParam
<
unsigned
int
>
(
_unique_name
+
"/width"
);
width
=
_server
.
getParam
<
unsigned
int
>
(
prefix
+
_unique_name
+
"/width"
);
height
=
_server
.
getParam
<
unsigned
int
>
(
_unique_name
+
"/height"
);
height
=
_server
.
getParam
<
unsigned
int
>
(
prefix
+
_unique_name
+
"/height"
);
pinhole_model_raw
=
_server
.
getParam
<
Eigen
::
Vector4d
>
(
_unique_name
+
"/pinhole_model_raw"
);
pinhole_model_raw
=
_server
.
getParam
<
Eigen
::
Vector4d
>
(
prefix
+
_unique_name
+
"/pinhole_model_raw"
);
pinhole_model_rectified
=
_server
.
getParam
<
Eigen
::
Vector4d
>
(
_unique_name
+
"/pinhole_model_rectified"
);
pinhole_model_rectified
=
_server
.
getParam
<
Eigen
::
Vector4d
>
(
prefix
+
_unique_name
+
"/pinhole_model_rectified"
);
distortion
=
_server
.
getParam
<
Eigen
::
VectorXd
>
(
_unique_name
+
"/distortion"
);
distortion
=
_server
.
getParam
<
Eigen
::
VectorXd
>
(
prefix
+
_unique_name
+
"/distortion"
);
}
}
std
::
string
print
()
const
std
::
string
print
()
const
{
{
...
@@ -52,6 +52,7 @@ class SensorCamera : public SensorBase
...
@@ -52,6 +52,7 @@ class SensorCamera : public SensorBase
SensorCamera
(
const
Eigen
::
VectorXd
&
_extrinsics
,
const
ParamsSensorCamera
&
_intrinsics
);
SensorCamera
(
const
Eigen
::
VectorXd
&
_extrinsics
,
const
ParamsSensorCamera
&
_intrinsics
);
SensorCamera
(
const
Eigen
::
VectorXd
&
_extrinsics
,
ParamsSensorCameraPtr
_intrinsics_ptr
);
SensorCamera
(
const
Eigen
::
VectorXd
&
_extrinsics
,
ParamsSensorCameraPtr
_intrinsics_ptr
);
WOLF_SENSOR_CREATE
(
SensorCamera
,
ParamsSensorCamera
,
7
);
~
SensorCamera
()
override
;
~
SensorCamera
()
override
;
...
@@ -82,11 +83,6 @@ class SensorCamera : public SensorBase
...
@@ -82,11 +83,6 @@ class SensorCamera : public SensorBase
public
:
public
:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
// to guarantee alignment (see http://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.html)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
;
// to guarantee alignment (see http://eigen.tuxfamily.org/dox-devel/group__TopicStructHavingEigenMembers.html)
static
SensorBasePtr
create
(
const
std
::
string
&
_unique_name
,
//
const
Eigen
::
VectorXd
&
_extrinsics
,
//
const
ParamsSensorBasePtr
_intrinsics
);
};
};
inline
bool
SensorCamera
::
useRawImages
()
inline
bool
SensorCamera
::
useRawImages
()
...
...
This diff is collapsed.
Click to expand it.
src/sensor/sensor_camera.cpp
+
1
−
15
View file @
bebdb9ee
...
@@ -46,21 +46,6 @@ Eigen::Matrix3d SensorCamera::setIntrinsicMatrix(Eigen::Vector4d _pinhole_model)
...
@@ -46,21 +46,6 @@ Eigen::Matrix3d SensorCamera::setIntrinsicMatrix(Eigen::Vector4d _pinhole_model)
K
.
row
(
2
)
<<
0
,
0
,
1
;
K
.
row
(
2
)
<<
0
,
0
,
1
;
return
K
;
return
K
;
}
}
// Define the factory method
SensorBasePtr
SensorCamera
::
create
(
const
std
::
string
&
_unique_name
,
//
const
Eigen
::
VectorXd
&
_extrinsics_pq
,
//
const
ParamsSensorBasePtr
_intrinsics
)
{
assert
(
_extrinsics_pq
.
size
()
==
7
&&
"Bad extrinsics vector length. Should be 7 for 3d."
);
std
::
shared_ptr
<
ParamsSensorCamera
>
intrinsics_ptr
=
std
::
static_pointer_cast
<
ParamsSensorCamera
>
(
_intrinsics
);
SensorCameraPtr
sen_ptr
=
std
::
make_shared
<
SensorCamera
>
(
_extrinsics_pq
,
intrinsics_ptr
);
sen_ptr
->
setName
(
_unique_name
);
return
sen_ptr
;
}
}
// namespace wolf
}
// namespace wolf
// Register in the FactorySensor
// Register in the FactorySensor
...
@@ -68,5 +53,6 @@ SensorBasePtr SensorCamera::create(const std::string& _unique_name, //
...
@@ -68,5 +53,6 @@ SensorBasePtr SensorCamera::create(const std::string& _unique_name, //
namespace
wolf
namespace
wolf
{
{
WOLF_REGISTER_SENSOR
(
SensorCamera
)
WOLF_REGISTER_SENSOR
(
SensorCamera
)
WOLF_REGISTER_SENSOR_AUTO
(
SensorCamera
)
}
// namespace wolf
}
// namespace wolf
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