mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-11 02:40:18 +08:00
Update camera calibration parameters
This commit is contained in:
@@ -388,7 +388,8 @@ ros2 service call /camera/set_user_calib_params orbbec_camera_msgs/srv/SetUserCa
|
||||
0.032955970615148544,
|
||||
9.096559369936585e-05,
|
||||
-0.0003368517500348389,
|
||||
-0.01115430984646082],
|
||||
-0.01115430984646082,
|
||||
0.0, 0.0, 0.0],
|
||||
rotation: [0.9999880790710449, 0.0003024190664291382, -0.004874417092651129,
|
||||
-0.0002965621242765337, 0.9999992251396179, 0.001202247804030776,
|
||||
0.004874777048826218, -0.0012007878394797444, 0.9999874234199524],
|
||||
@@ -404,5 +405,5 @@ ros2 service call /camera/get_user_calib_params orbbec_camera_msgs/srv/GetUserCa
|
||||
```
|
||||
|
||||
> **Note**:
|
||||
> The following four services (`/camera/write_customer_data`, `/camera/read_customer_data`, `/camera/set_user_calib_params`, `/camera/get_user_calib_params`) are currently supported only on the 435Le module.
|
||||
> Each service can store only one set of data or string at a time.
|
||||
> The following four services (`/camera/write_customer_data`, `/camera/read_customer_data`, `/camera/set_user_calib_params`, `/camera/get_user_calib_params`) are currently supported only on the 435Le module.
|
||||
> Each service can store only one set of data or string at a time.
|
||||
|
||||
@@ -28,10 +28,27 @@ class CameraExampleNode : public rclcpp::Node {
|
||||
}
|
||||
|
||||
auto req = std::make_shared<orbbec_camera_msgs::srv::SetUserCalibParams::Request>();
|
||||
req->k = {525.0, 0.0, 319.5, 0.0, 525.0, 239.5, 0.0, 0.0, 1.0};
|
||||
req->d = {0.01, -0.02, 0.0, 0.0, 0.0};
|
||||
req->rotation = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0};
|
||||
req->translation = {0.0, 0.0, 0.0};
|
||||
req->k = {614.9613647460938,
|
||||
0.0,
|
||||
634.91552734375,
|
||||
0.0,
|
||||
614.65771484375,
|
||||
391.407470703125,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0};
|
||||
req->d = {-0.03131488710641861,
|
||||
0.032955970615148544,
|
||||
9.096559369936585e-05,
|
||||
-0.0003368517500348389,
|
||||
-0.01115430984646082,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0};
|
||||
req->rotation = {0.9999880790710449, 0.0003024190664291382, -0.004874417092651129,
|
||||
-0.0002965621242765337, 0.9999992251396179, 0.001202247804030776,
|
||||
0.004874777048826218, -0.0012007878394797444, 0.9999874234199524};
|
||||
req->translation = {-0.023897956848144532, -9.439220279455185e-05, -6.804073229432106e-06};
|
||||
|
||||
auto result = set_params_client_->async_send_request(req);
|
||||
if (rclcpp::spin_until_future_complete(this->get_node_base_interface(), result) !=
|
||||
|
||||
@@ -22,7 +22,6 @@ rosidl_generate_interfaces(
|
||||
"msg/Metadata.msg"
|
||||
"msg/IMUInfo.msg"
|
||||
"msg/RGBD.msg"
|
||||
"msg/DeviceStatus.msg"
|
||||
"srv/GetBool.srv"
|
||||
"srv/GetDeviceInfo.srv"
|
||||
"srv/GetCameraInfo.srv"
|
||||
|
||||
Reference in New Issue
Block a user