Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mobile_robotics
ADC
external
libuvc_ros
Commits
0ab494b9
Commit
0ab494b9
authored
Aug 01, 2013
by
Michael Stypa
Committed by
v4hn
Oct 04, 2013
Browse files
fixed setting frame_id
parent
928a5c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
libuvc_camera/src/camera_driver.cpp
View file @
0ab494b9
...
...
@@ -35,6 +35,7 @@
#include
<ros/ros.h>
#include
<sensor_msgs/Image.h>
#include
<std_msgs/Header.h>
#include
<image_transport/camera_publisher.h>
#include
<dynamic_reconfigure/server.h>
#include
<dynamic_reconfigure/SensorLevels.h>
...
...
@@ -166,9 +167,16 @@ void CameraDriver::ImageCallback(uvc_frame_t *frame) {
image
->
data
.
resize
(
image
->
step
*
image
->
height
);
memcpy
(
&
(
image
->
data
[
0
]),
rgb_frame_
->
data
,
rgb_frame_
->
data_bytes
);
sensor_msgs
::
CameraInfo
::
Const
Ptr
cinfo
(
sensor_msgs
::
CameraInfo
::
Ptr
cinfo
(
new
sensor_msgs
::
CameraInfo
(
cinfo_manager_
.
getCameraInfo
()));
std_msgs
::
Header
::
Ptr
imageheader
(
new
std_msgs
::
Header
());
std_msgs
::
Header
::
Ptr
cinfoheader
(
new
std_msgs
::
Header
());
imageheader
->
frame_id
=
config_
.
frame_id
;
cinfoheader
->
frame_id
=
config_
.
frame_id
;
image
->
header
=
*
imageheader
;
cinfo
->
header
=
*
cinfoheader
;
cam_pub_
.
publish
(
image
,
cinfo
);
if
(
config_changed_
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment