Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit for See3cam_cu130 #6

Open
wants to merge 1 commit into
base: see3cam_130
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ Camera::Camera(ros::NodeHandle _comm_nh, ros::NodeHandle _param_nh) :
exposure_pub = node.advertise<std_msgs::Float64>("exposure", 1, true);

/* initialize the cameras */
cam = new uvc_cam::Cam(device.c_str(), uvc_cam::Cam::MODE_BAYER, width, height, fps);
cam = new uvc_cam::Cam(device.c_str(), uvc_cam::Cam::MODE_YUYV, width, height, fps);
//cam->set_motion_thresholds(100, -1);
cam->set_control(0x009a0901, 1); // exposure, auto (0 = auto, 1 = manual)
cam->set_control(0x00980900, 8); // brightness
cam->set_control(0x9a0902, 78); // exposure time 15.6ms
cam->set_control(0x009a0901, 0); // exposure, auto (0 = auto, 1 = manual)
cam->set_control(0x00980900, 0); // brightness
// cam->set_control(0x9a0902, 78); // exposure time 15.6ms
std_msgs::Float64 exposure_msg;
exposure_msg.data=7.8 * 0.5;
exposure_pub.publish( exposure_msg );
Expand Down Expand Up @@ -127,8 +127,8 @@ Camera::Camera(ros::NodeHandle _comm_nh, ros::NodeHandle _param_nh) :

image->height = height;
image->width = width;
image->step = width;
image->encoding = image_encodings::BAYER_GRBG8;
image->step = width * 2;
image->encoding = image_encodings::YUV422;

image->header.stamp = capture_time;
image->header.seq = pair_id;
Expand Down