Skip to content

Commit 84aa917

Browse files
committed
Fix 2cm baselink offset, update servicer cam to realsense.
1 parent 28703bd commit 84aa917

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

src/calibration_behaviors/src/save_calibration_pose_yaml.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ BT::NodeStatus SaveCalibrationPoseYaml::tick()
5858
double roll, pitch, yaw;
5959
tf2::Matrix3x3(quat).getRPY(roll, pitch, yaw);
6060

61-
// Create the YAML to save.
62-
YAML::Node node;
63-
std::string calibration_data_str = "camera_pose";
64-
node[calibration_data_str]["x"] = pose_stamped.pose.position.x;
65-
node[calibration_data_str]["y"] = pose_stamped.pose.position.y;
66-
node[calibration_data_str]["z"] = pose_stamped.pose.position.z;
67-
node[calibration_data_str]["roll"] = roll;
68-
node[calibration_data_str]["pitch"] = pitch;
69-
node[calibration_data_str]["yaw"] = yaw;
70-
7161
// Attempt to save the file.
7262
const std::string objective_source_directory =
7363
shared_resources_->node->get_parameter("config_source_directory").as_string() + "/objectives";
@@ -82,7 +72,9 @@ BT::NodeStatus SaveCalibrationPoseYaml::tick()
8272
shared_resources_->logger->publishInfoMessage(
8373
fmt::format("Writing calibration file to '{}'", filepath_maybe.value().string()));
8474
std::ofstream file_out(filepath_maybe.value());
85-
file_out << node;
75+
// Format for raw copy to .xacro
76+
file_out << "<origin xyz=\" " << pose_stamped.pose.position.x << " " << pose_stamped.pose.position.y << " "
77+
<< pose_stamped.pose.position.z << "\" rpy=\"" << roll << " " << pitch << " " << yaw << "\" />";
8678
file_out.close();
8779

8880
return BT::NodeStatus::SUCCESS;

src/moveit_pro_kinova_configs/space_satellite_sim_camera_cal/description/mujoco/gen3_7dof_body.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<mujocoinclude>
2-
<body name="base_link" gravcomp="1" pos="0 0 0.02" quat="1 0 0 0">
2+
<body name="base_link" gravcomp="1" pos="0 0 0" quat="1 0 0 0">
33
<inertial
44
pos="-0.000648 -0.000166 0.084487"
55
quat="1 0 0 0"

src/moveit_pro_kinova_configs/space_satellite_sim_camera_cal/description/mujoco/scene.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@
103103
euler="1.5708 -2 0.0"
104104
user="1"
105105
/>
106-
<site
107-
name="servicer_camera_mounting_frame"
108-
pos="0.6 1 0"
109-
euler="1.5708 -2 0.0"
110-
size="0.03"
111-
/>
112106
<site
113107
name="servicer_camera_optical_frame"
114108
pos="0.6 1 0"

src/moveit_pro_kinova_configs/space_satellite_sim_camera_cal/description/space_satellite_sim.xacro

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,9 @@
555555
</visual>
556556
</link>
557557
<joint name="calibration_tool_joint" type="fixed">
558-
<parent link="grasp_link"/>
558+
<parent link="robotiq_85_base_link"/>
559559
<child link="calibration_tool_link"/>
560-
<origin xyz="0 0 0.019" rpy="0 0 0"/>
560+
<origin xyz="0 0 0.169" rpy="0 0 0"/>
561561
</joint>
562562
<link name="calibration_tag_right">
563563
<visual>
@@ -607,15 +607,27 @@
607607
<origin xyz="0 -0.09325 -0.01" rpy="0 ${pi} ${pi}"/>
608608
</joint>
609609

610-
<!-- Camera External -->
611-
<link name="external_camera_link" />
612-
<joint name="external_camera_joint" type="fixed">
610+
<!-- Servicer Camera -->
611+
<link name="servicer_camera_mount_link" />
612+
<joint name="servicer_camera_mount_joint" type="fixed">
613+
<parent link="world" />
614+
<child link="servicer_camera_mount_link" />
615+
<origin xyz=" 0.585021 0.966828 -0.0111449" rpy="0.00122423 0.00171265 -0.426171" />
616+
</joint>
617+
618+
<xacro:realsense_d415 parent="servicer_camera_mount_link" name="servicer_camera">
619+
<origin xyz="0 0 0" rpy="0 0 0" />
620+
</xacro:realsense_d415>
621+
622+
<!-- Scene Camera -->
623+
<link name="scene_camera_mount_link" />
624+
<joint name="scene_camera_mount_joint" type="fixed">
613625
<parent link="world" />
614-
<child link="external_camera_link" />
626+
<child link="scene_camera_mount_link" />
615627
<origin xyz="-0.3 0.3 1.0" rpy="0 0.5236 0" />
616628
</joint>
617629

618-
<xacro:realsense_d415 parent="external_camera_link" name="scene_camera">
630+
<xacro:realsense_d415 parent="scene_camera_mount_link" name="scene_camera">
619631
<origin xyz="0 0 0" rpy="0 0 0" />
620632
</xacro:realsense_d415>
621633

0 commit comments

Comments
 (0)