Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
iri_mvbluefox3_camera_driver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
labrobotica
ros
sensors
mono_cameras
iri_mvbluefox3_camera_driver
Commits
3c986f8a
Commit
3c986f8a
authored
8 years ago
by
Angel Santamaria-Navarro
Browse files
Options
Downloads
Patches
Plain Diff
almost working. only raw messages to be fixed in ros node
parent
f9faebc1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mvbluefox3_camera_driver.cpp
+72
-2
72 additions, 2 deletions
src/mvbluefox3_camera_driver.cpp
with
72 additions
and
2 deletions
src/mvbluefox3_camera_driver.cpp
+
72
−
2
View file @
3c986f8a
...
...
@@ -282,11 +282,81 @@ void Mvbluefox3CameraDriver::GetROSImage(const int &ncam, sensor_msgs::Image &im
{
ros
::
Time
start_time
=
ros
::
Time
::
now
();
char
*
image
;
char
*
image
=
NULL
;
this
->
vcam_ptr
[
ncam
]
->
GetImage
(
&
image
);
GetConfig
(
ncam
);
std
::
string
encoding
;
encoding
=
CMvbluefox3
::
codings_str
[
this
->
vparams
[
ncam
].
pixel_format
];
int
bp
=
this
->
vcam_ptr
[
ncam
]
->
GetBytesPixel
();
int
depth
=
this
->
vcam_ptr
[
ncam
]
->
GetDepth
();
bool
ROSvalid
=
true
;
switch
(
this
->
vparams
[
ncam
].
pixel_format
)
{
case
CMvbluefox3
::
raw
:
// switch (depth*bp)
// {
// case 8: encoding = "8UC1"; break;
// case 16: encoding = "8UC2"; break;
// case 24: encoding = "8UC3"; break;
// case 32: encoding = "8UC4"; break;
// default: ROS_WARN("Invalid depth. Depth not implemented for sensor_msgs."); break;
// }
encoding
=
"rgb8"
;
break
;
case
CMvbluefox3
::
mono8
:
break
;
case
CMvbluefox3
::
mono10
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
mono12
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
mono12v1
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
mono12v2
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
mono14
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
mono16
:
encoding
=
"16UC1"
;
break
;
case
CMvbluefox3
::
rgb8
:
break
;
case
CMvbluefox3
::
bgr8
:
break
;
case
CMvbluefox3
::
bgr8p
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
bgra8p
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
bgr10
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
bgr12
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
bgr14
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
bgr16
:
encoding
=
"16UC3"
;
break
;
case
CMvbluefox3
::
bgra8
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv411uyyvyy
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv422
:
break
;
case
CMvbluefox3
::
yuv422p
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv42210
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv422uyvy
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv422uyvy10
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv444
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv44410p
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv444uyv
:
ROSvalid
=
false
;
break
;
case
CMvbluefox3
::
yuv444uyv10
:
ROSvalid
=
false
;
break
;
}
if
(
!
ROSvalid
)
ROS_WARN
(
"mvBlueFOX3 pixel format %s no valid within ROS messages."
,
encoding
.
c_str
());
// else if(config.coding==RAW)
// {
// this->camera.Image_msg_->encoding=this->driver_.get_bayer_pattern();
// }
// else
// {
// if(config.depth==DEPTH24)
// this->camera.Image_msg_->encoding="rgb8";
// else if(config.depth==DEPTH48)
// this->camera.Image_msg_->encoding="16UC3";
// else
// this->camera.Image_msg_->encoding="16UC3";
// }
// }
// //
sensor_msgs
::
fillImage
(
img_msg
,
CMvbluefox3
::
codings_str
[
this
->
vparams
[
ncam
].
pixel_format
]
,
encoding
,
this
->
vparams
[
ncam
].
height
,
this
->
vparams
[
ncam
].
width
,
this
->
vcam_ptr
[
ncam
]
->
GetImgLinePitch
(),
...
...
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