Skip to content

Commit

Permalink
Display warning for hardcoded extrinsic
Browse files Browse the repository at this point in the history
Display a warning message about the use of the hardcoded extrinsic
value for the color camera on ZR300 until librealsense supports it.
  • Loading branch information
mdhorn committed Nov 18, 2016
1 parent d190dce commit 1a06323
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions realsense_camera/src/zr300_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,18 +774,21 @@ namespace realsense_camera


// Get offset between base frame and imu frame
/* Temporarily commenting out the code. Instead, hardcoding the values until fully supported by librealsense API.

rs_get_motion_extrinsics_from(rs_device_, RS_STREAM_COLOR, &z_extrinsic, &rs_error_);
if (rs_error_)
{
ROS_ERROR_STREAM(nodelet_name_ << " - Verify camera is calibrated!");
/* Temporarily hardcoding the values until fully supported by librealsense API. */
// ROS_ERROR_STREAM(nodelet_name_ << " - Verify camera is calibrated!");
ROS_WARN_STREAM(nodelet_name_ << " - Using Hardcoded extrinsic for IMU.");
rs_free_error(rs_error_);
rs_error_ = NULL;

z_extrinsic.translation[0] = -0.07;
z_extrinsic.translation[1] = 0.0;
z_extrinsic.translation[2] = 0.0;
}
checkError();
*/
z_extrinsic.translation[0] = -0.07;
z_extrinsic.translation[1] = 0.0;
z_extrinsic.translation[2] = 0.0;
//checkError();

// Transform base frame to imu frame
b2imu_msg.header.stamp = static_transform_ts_;
Expand Down

0 comments on commit 1a06323

Please sign in to comment.