55 const std::string
LOGNAME =
"visual_tools";
65 : nh_(nh), marker_topic_(
std::move(marker_topic)), base_frame_(
std::move(base_frame))
214 mesh_marker_.type = visualization_msgs::Marker::MESH_RESOURCE;
253 text_marker_.type = visualization_msgs::Marker::TEXT_VIEW_FACING;
286 if (wait_for_subscriber)
294 bool blocking =
true;
300 bool blocking =
false;
321 if (blocking && num_existing_subscribers == 0)
327 while (num_existing_subscribers == 0)
333 <<
" sec. It is possible initially published visual messages "
378 std_msgs::ColorRGBA result;
495 "be used with getColor(). Defaulting to "
514 case 0:
return BLACK;
break;
515 case 1:
return BROWN;
break;
516 case 2:
return BLUE;
break;
517 case 3:
return CYAN;
break;
518 case 4:
return GREY;
break;
520 case 6:
return GREEN;
break;
523 case 9:
return ORANGE;
break;
524 case 10:
return PURPLE;
break;
525 case 11:
return RED;
break;
526 case 12:
return PINK;
break;
527 case 13:
return WHITE;
break;
528 case 14:
return YELLOW;
break;
532 case 18:
return RAND;
break;
533 case 19:
return CLEAR;
break;
534 case 20:
return DEFAULT;
break;
548 case 4:
return XSMALL;
break;
549 case 5:
return SMALL;
break;
550 case 6:
return MEDIUM;
break;
551 case 7:
return LARGE;
break;
552 case 8:
return XLARGE;
break;
556 default:
throw std::runtime_error(
"Unknown size");
567 case XXXXSMALL:
return "XXXXSMALL";
break;
568 case XXXSMALL:
return "XXXSMALL";
break;
569 case XXSMALL:
return "XXSMALL";
break;
570 case XSMALL:
return "XSMALL";
break;
571 case SMALL:
return "SMALL";
break;
573 case LARGE:
return "LARGE";
break;
574 case XLARGE:
return "XLARGE";
break;
575 case XXLARGE:
return "XXLARGE";
break;
576 case XXXLARGE:
return "XXXLARGE";
break;
577 case XXXXLARGE:
return "XXXXLARGE";
break;
578 default:
throw std::runtime_error(
"Unknown size");
586 std_msgs::ColorRGBA result;
588 const std::size_t max_attempts = 20;
589 std::size_t attempts = 0;
595 result.g =
fRand(0.0, 1.0);
596 result.b =
fRand(0.0, 1.0);
600 if (attempts > max_attempts)
605 }
while (result.r + result.g + result.b < 1.5);
615 return start + (((end -
start) / range) * value);
632 std_msgs::ColorRGBA
start;
633 std_msgs::ColorRGBA end;
640 else if (value == 1.0)
644 else if (value <= 0.5)
653 value = fmod(value, 0.5);
656 std_msgs::ColorRGBA result;
667 geometry_msgs::Vector3 result;
719 Eigen::Vector3d center;
720 center[0] = (a[0] + b[0]) / 2.0;
721 center[1] = (a[1] + b[1]) / 2.0;
722 center[2] = (a[2] + b[2]) / 2.0;
728 bool verbose =
false;
737 Eigen::Isometry3d result_pose = Eigen::Isometry3d::Identity();
740 Eigen::Quaterniond q;
741 Eigen::Vector3d axis_vector = b - a;
745 std::cout << std::endl;
746 std::cout <<
"axis_vector " << std::endl;
750 axis_vector.normalize();
754 std::cout << std::endl;
755 std::cout <<
"axis_vector after normalize " << std::endl;
759 Eigen::Vector3d up_vector(0.0, 0.0, 1.0);
760 Eigen::Vector3d right_axis_vector = axis_vector.cross(up_vector);
764 std::cout <<
"right_axis_vector " << std::endl;
768 if (right_axis_vector[0] == 0.0 && right_axis_vector[1] == 0.0 && right_axis_vector[2] == 0.0)
772 std::cout <<
"right axis vector is zero " << std::endl;
774 result_pose = Eigen::AngleAxisd(-0.5 * M_PI, Eigen::Vector3d::UnitY());
775 result_pose.translation() = a;
779 right_axis_vector.normalize();
783 std::cout <<
"right_axis_vector normalized " << std::endl;
787 double theta = axis_vector.dot(up_vector);
788 double angle_rotation = -1.0 * acos(theta);
790 q = Eigen::AngleAxis<double>(angle_rotation, right_axis_vector);
796 std::cout <<
"rotation matrix after normalize: " << std::endl;
797 std::cout << q.toRotationMatrix() << std::endl;
801 result_pose = q * Eigen::AngleAxisd(-0.5 * M_PI, Eigen::Vector3d::UnitY());
802 result_pose.translation() = a;
834 if (
markers_.markers.size() >= queueSize || queueSize == 0)
877 if (markers.markers.empty())
885 for (
auto& marker : markers.markers)
887 marker.color.r = 1.0 - marker.color.r;
888 marker.color.g = 1.0 - marker.color.g;
889 marker.color.b = 1.0 - marker.color.b;
890 for (
auto& color : marker.colors)
892 color.r = 1.0 - color.r;
893 color.g = 1.0 - color.g;
894 color.b = 1.0 - color.b;
899 for (
auto& marker : markers.markers)
902 norm += marker.pose.orientation.w * marker.pose.orientation.w;
903 norm += marker.pose.orientation.x * marker.pose.orientation.x;
904 norm += marker.pose.orientation.y * marker.pose.orientation.y;
905 norm += marker.pose.orientation.z * marker.pose.orientation.z;
906 norm = std::sqrt(norm);
907 if (norm < std::numeric_limits<double>::epsilon())
909 marker.pose.orientation.w = 1;
910 marker.pose.orientation.x = 0;
911 marker.pose.orientation.y = 0;
912 marker.pose.orientation.z = 0;
916 marker.pose.orientation.w = marker.pose.orientation.w / norm;
917 marker.pose.orientation.x = marker.pose.orientation.x / norm;
918 marker.pose.orientation.y = marker.pose.orientation.y / norm;
919 marker.pose.orientation.z = marker.pose.orientation.z / norm;
940 geometry_msgs::Point p[3];
941 static const double DELTA_THETA = M_PI / 16.0;
945 for (std::size_t i = 0; i < 32; i++)
952 p[1].y = scale * cos(theta) /
angle;
953 p[1].z = scale * sin(theta) /
angle;
956 p[2].y = scale * cos(theta + DELTA_THETA) /
angle;
957 p[2].z = scale * sin(theta + DELTA_THETA) /
angle;
963 theta += DELTA_THETA;
974 double x_width,
double y_width)
977 Eigen::Vector3d n(
A, B, C);
980 double distance = D / n.norm();
981 Eigen::Vector3d center = -distance * n.normalized();
983 Eigen::Isometry3d pose;
984 pose.translation() = center;
987 Eigen::Vector3d z_0 = Eigen::Vector3d::UnitZ();
988 Eigen::Quaterniond q = Eigen::Quaterniond::FromTwoVectors(z_0, n);
989 pose.linear() = q.toRotationMatrix();
991 double height = 0.001;
1010 geometry_msgs::Point p[4];
1011 p[0].x = 1.0 * scale;
1012 p[0].y = 1.0 * scale;
1015 p[1].x = -1.0 * scale;
1016 p[1].y = 1.0 * scale;
1019 p[2].x = -1.0 * scale;
1020 p[2].y = -1.0 * scale;
1023 p[3].x = 1.0 * scale;
1024 p[3].y = -1.0 * scale;
1056 geometry_msgs::Point p[4];
1057 p[0].x = 1.0 * scale;
1059 p[0].z = 1.0 * scale;
1061 p[1].x = -1.0 * scale;
1063 p[1].z = 1.0 * scale;
1065 p[2].x = -1.0 * scale;
1067 p[2].z = -1.0 * scale;
1069 p[3].x = 1.0 * scale;
1071 p[3].z = -1.0 * scale;
1102 geometry_msgs::Point p[4];
1104 p[0].y = 1.0 * scale;
1105 p[0].z = 1.0 * scale;
1108 p[1].y = -1.0 * scale;
1109 p[1].z = 1.0 * scale;
1112 p[2].y = -1.0 * scale;
1113 p[2].z = -1.0 * scale;
1116 p[3].y = 1.0 * scale;
1117 p[3].z = -1.0 * scale;
1144 geometry_msgs::Pose pose_msg;
1158 const std::string& ns, std::size_t
id)
1161 pose_msg.position = point;
1174 geometry_msgs::Vector3 scale_msg;
1182 const std::string& ns, std::size_t
id)
1188 const geometry_msgs::Vector3 scale,
const std::string& ns, std::size_t
id)
1194 const geometry_msgs::Vector3 scale,
const std::string& ns, std::size_t
id)
1202 const geometry_msgs::Vector3 scale,
const std::string& ns, std::size_t
id)
1227 const geometry_msgs::Vector3 scale,
const std::string& ns, std::size_t
id)
1270 Eigen::Isometry3d arrow_pose = pose * Eigen::AngleAxisd(M_PI / 2, Eigen::Vector3d::UnitZ());
1276 Eigen::Isometry3d arrow_pose =
convertPose(pose) * Eigen::AngleAxisd(M_PI / 2, Eigen::Vector3d::UnitZ());
1282 Eigen::Isometry3d arrow_pose =
convertPose(pose.pose) * Eigen::AngleAxisd(M_PI / 2, Eigen::Vector3d::UnitZ());
1283 geometry_msgs::PoseStamped new_pose = pose;
1291 Eigen::Isometry3d arrow_pose = pose * Eigen::AngleAxisd(-M_PI / 2, Eigen::Vector3d::UnitY());
1297 Eigen::Isometry3d arrow_pose =
convertPose(pose) * Eigen::AngleAxisd(-M_PI / 2, Eigen::Vector3d::UnitY());
1303 Eigen::Isometry3d arrow_pose =
convertPose(pose.pose) * Eigen::AngleAxisd(-M_PI / 2, Eigen::Vector3d::UnitY());
1304 geometry_msgs::PoseStamped new_pose = pose;
1312 Eigen::Isometry3d arrow_pose =
convertPose(pose.pose) * Eigen::AngleAxisd(-M_PI / 2, Eigen::Vector3d::UnitY());
1313 geometry_msgs::PoseStamped new_pose = pose;
1315 return publishArrow(new_pose, color, scale, length,
id);
1395 scales scale, std::size_t
id)
1439 geometry_msgs::Pose pose_shifted = pose;
1440 pose_shifted.position.x -= 0.05;
1441 pose_shifted.position.y -= 0.05;
1442 pose_shifted.position.z -= 0.05;
1443 publishText(pose_shifted, label, color,
static_cast<scales>(
static_cast<int>(scale) + 1),
false);
1450 return publishAxis(pose, radius * 10.0, radius, ns);
1456 return publishAxis(pose, radius * 10.0, radius, ns);
1474 const std::string& ns)
1477 Eigen::Isometry3d x_pose =
1478 Eigen::Translation3d(length / 2.0, 0, 0) * Eigen::AngleAxisd(M_PI / 2.0, Eigen::Vector3d::UnitY());
1479 x_pose = pose * x_pose;
1483 Eigen::Isometry3d y_pose =
1484 Eigen::Translation3d(0, length / 2.0, 0) * Eigen::AngleAxisd(M_PI / 2.0, Eigen::Vector3d::UnitX());
1485 y_pose = pose * y_pose;
1489 Eigen::Isometry3d z_pose = Eigen::Translation3d(0, 0, length / 2.0) * Eigen::AngleAxisd(0, Eigen::Vector3d::UnitZ());
1490 z_pose = pose * z_pose;
1499 for (
const auto& i : path)
1509 const std::string& ns)
1512 for (
const auto& i : path)
1521 scales scale,
const std::string& ns)
1528 double radius,
const std::string& ns)
1534 const std_msgs::ColorRGBA& color,
double radius,
const std::string& ns)
1537 double height = (point1 - point2).lpNorm<2>();
1543 Eigen::Isometry3d pose;
1547 Eigen::Isometry3d rotation;
1548 rotation = Eigen::AngleAxisd(0.5 * M_PI, Eigen::Vector3d::UnitY());
1549 pose = pose * rotation;
1556 const std::string& ns)
1562 const std::string& ns)
1568 double radius,
const std::string& ns)
1591 double scale,
const std::string& ns, std::size_t
id)
1597 double scale,
const std::string& ns, std::size_t
id)
1635 double scale,
const std::string& ns, std::size_t
id)
1641 double scale,
const std::string& ns, std::size_t
id)
1656 for (
const shape_msgs::MeshTriangle& triangle : mesh.triangles)
1657 for (
const uint32_t& index : triangle.vertex_indices)
1683 typedef std::pair<std::size_t, std::size_t> node_ids;
1684 std::set<node_ids> added_edges;
1685 std::pair<std::set<node_ids>::iterator,
bool> return_value;
1686 Eigen::Vector3d a, b;
1687 for (std::size_t i = 0; i < graph.nodes.size(); ++i)
1689 for (std::size_t j = 0; j < graph.edges[i].node_ids.size(); ++j)
1692 return_value = added_edges.insert(node_ids(i, j));
1693 if (!return_value.second)
1701 b =
convertPoint(graph.nodes[graph.edges[i].node_ids[j]]);
1717 colors color,
const std::string& ns, std::size_t
id)
1736 pose.position.x = (point1.x - point2.x) / 2.0 + point2.x;
1737 pose.position.y = (point1.y - point2.y) / 2.0 + point2.y;
1738 pose.position.z = (point1.z - point2.z) / 2.0 + point2.z;
1813 return publishCuboid(pose, size.x(), size.y(), size.z(), color);
1835 geometry_msgs::Vector3 scale;
1843 const std_msgs::ColorRGBA& color,
scales scale)
1849 const std_msgs::ColorRGBA& color,
double radius)
1851 geometry_msgs::Vector3 scale;
1865 const std_msgs::ColorRGBA& color,
scales scale)
1871 const std_msgs::ColorRGBA& color,
const geometry_msgs::Vector3& scale)
1893 BOOST_ASSERT_MSG(aPoints.size() == bPoints.size() && bPoints.size() ==
colors.size(),
"Mismatching vector sizes: "
1894 "aPoints, bPoints, and colors");
1896 std::vector<geometry_msgs::Point> a_points_msg;
1897 std::vector<geometry_msgs::Point> b_points_msg;
1898 std::vector<std_msgs::ColorRGBA> colors_msg;
1900 for (std::size_t i = 0; i < aPoints.size(); ++i)
1908 BOOST_ASSERT_MSG(a_points_msg.size() == b_points_msg.size() && b_points_msg.size() == colors_msg.size(),
1916 const std::vector<geometry_msgs::Point>& bPoints,
1917 const std::vector<std_msgs::ColorRGBA>&
colors,
const geometry_msgs::Vector3& scale)
1935 for (std::size_t i = 0; i < aPoints.size(); ++i)
1945 BOOST_ASSERT_MSG(
line_list_marker_.colors.size() == aPoints.size() * 2,
"Colors arrays mismatch in size");
1952 const std::string& ns)
1954 if (path.size() < 2)
1966 std_msgs::ColorRGBA this_color =
getColor(color);
1974 for (std::size_t i = 1; i < path.size(); ++i)
1988 const std::string& ns)
1990 std::vector<geometry_msgs::Point> point_path(path.size());
1991 for (std::size_t i = 0; i < path.size(); ++i)
1993 point_path[i] = path[i].position;
2000 const std::string& ns)
2006 const std::string& ns)
2012 const std::string& ns)
2018 const std::string& ns)
2020 if (path.size() < 2)
2027 for (std::size_t i = 1; i < path.size(); ++i)
2036 const std::string& ns)
2038 if (path.size() < 2)
2045 for (std::size_t i = 1; i < path.size(); ++i)
2054 const std::string& ns)
2056 if (path.size() < 2)
2063 for (std::size_t i = 1; i < path.size(); ++i)
2065 publishCylinder(path[i - 1].translation(), path[i].translation(), color, radius, ns);
2072 double radius,
const std::string& ns)
2074 if (path.size() < 2)
2080 if (path.size() !=
colors.size())
2083 "Skipping path because " << path.size() <<
" different from " <<
colors.size() <<
".");
2088 for (std::size_t i = 1; i < path.size(); ++i)
2097 double radius,
const std::string& ns)
2099 if (path.size() < 2)
2105 if (path.size() !=
colors.size())
2108 "Skipping path because " << path.size() <<
" different from " <<
colors.size() <<
".");
2113 for (std::size_t i = 1; i < path.size(); ++i)
2122 const std::string& ns)
2124 std::vector<geometry_msgs::Point> points;
2125 geometry_msgs::Point temp;
2126 geometry_msgs::Point first;
2129 for (std::size_t i = 0; i < polygon.points.size(); ++i)
2131 temp.x = polygon.points[i].x;
2132 temp.y = polygon.points[i].y;
2133 temp.z = polygon.points[i].z;
2138 points.push_back(temp);
2140 points.push_back(first);
2146 colors color,
const std::string& ns, std::size_t
id)
2148 Eigen::Vector3d min_point, max_point;
2149 min_point << -depth / 2, -width / 2, -height / 2;
2150 max_point << depth / 2, width / 2, height / 2;
2155 const Eigen::Vector3d& max_point,
colors color,
const std::string& ns,
2159 Eigen::Vector3d p1(min_point[0], min_point[1], min_point[2]);
2160 Eigen::Vector3d p2(min_point[0], min_point[1], max_point[2]);
2161 Eigen::Vector3d p3(max_point[0], min_point[1], max_point[2]);
2162 Eigen::Vector3d p4(max_point[0], min_point[1], min_point[2]);
2163 Eigen::Vector3d p5(min_point[0], max_point[1], min_point[2]);
2164 Eigen::Vector3d p6(min_point[0], max_point[1], max_point[2]);
2165 Eigen::Vector3d p7(max_point[0], max_point[1], max_point[2]);
2166 Eigen::Vector3d p8(max_point[0], max_point[1], min_point[2]);
2190 std_msgs::ColorRGBA this_color =
getColor(color);
2276 Eigen::Vector3d p1(-width / 2.0, -height / 2.0, 0.0);
2277 Eigen::Vector3d p2(-width / 2.0, height / 2.0, 0.0);
2278 Eigen::Vector3d p3(width / 2.0, height / 2.0, 0.0);
2279 Eigen::Vector3d p4(width / 2.0, -height / 2.0, 0.0);
2290 std_msgs::ColorRGBA this_color =
getColor(color);
2325 const Eigen::Vector3d& p2_in,
const Eigen::Vector3d& p3_in,
2326 const Eigen::Vector3d& p4_in,
colors color,
scales scale)
2346 std_msgs::ColorRGBA this_color =
getColor(color);
2380 const std::string& ns)
2382 std::vector<geometry_msgs::Point> points_msg;
2384 for (
const auto& point : points)
2393 const std::string& ns)
2395 std::vector<geometry_msgs::Point> points_msg;
2397 for (
const auto& point : points)
2406 const std::string& ns)
2408 geometry_msgs::Vector3 scale_vector;
2416 const std::string& ns)
2422 const geometry_msgs::Vector3& scale,
const std::string& ns)
2430 std_msgs::ColorRGBA this_color =
getColor(color);
2438 for (std::size_t i = 0; i < points.size(); ++i)
2448 scales scale,
const std::string& ns)
2450 BOOST_ASSERT_MSG(points.size() ==
colors.size(),
"Mismatching vector sizes: points and colors");
2452 std::vector<geometry_msgs::Point> points_msg;
2453 std::vector<std_msgs::ColorRGBA> colors_msg;
2455 for (std::size_t i = 0; i < points.size(); ++i)
2467 const std::vector<std_msgs::ColorRGBA>&
colors,
2468 const geometry_msgs::Vector3& scale,
const std::string& ns)
2491 const geometry_msgs::Vector3 scale,
bool static_id)
2503 const geometry_msgs::Vector3 scale,
bool static_id)
2538 geometry_msgs::Pose pose_msg;
2550 Eigen::Isometry3d shared_pose_eigen;
2552 return shared_pose_eigen;
2562 Eigen::Isometry3d shared_pose_eigen;
2563 shared_pose_eigen = Eigen::Isometry3d::Identity();
2564 shared_pose_eigen.translation().x() = point.x;
2565 shared_pose_eigen.translation().y() = point.y;
2566 shared_pose_eigen.translation().z() = point.z;
2567 return shared_pose_eigen;
2572 geometry_msgs::Pose pose_msg;
2573 pose_msg.orientation.x = 0.0;
2574 pose_msg.orientation.y = 0.0;
2575 pose_msg.orientation.z = 0.0;
2576 pose_msg.orientation.w = 1.0;
2577 pose_msg.position = point;
2583 Eigen::Isometry3d shared_pose_eigen;
2584 shared_pose_eigen = Eigen::Isometry3d::Identity();
2585 shared_pose_eigen.translation() = point;
2586 return shared_pose_eigen;
2591 geometry_msgs::Pose pose_msg;
2593 return pose_msg.position;
2598 Eigen::Vector3d point_eigen;
2599 point_eigen[0] = point.x;
2600 point_eigen[1] = point.y;
2601 point_eigen[2] = point.z;
2607 Eigen::Vector3d point_eigen;
2608 point_eigen[0] = point.x;
2609 point_eigen[1] = point.y;
2610 point_eigen[2] = point.z;
2616 geometry_msgs::Point32 point32_msg;
2617 point32_msg.x = point[0];
2618 point32_msg.y = point[1];
2619 point32_msg.z = point[2];
2625 geometry_msgs::Point point_msg;
2626 point_msg.x = point.x;
2627 point_msg.y = point.y;
2628 point_msg.z = point.z;
2634 geometry_msgs::Point point_msg;
2635 point_msg.x = point.x();
2636 point_msg.y = point.y();
2637 point_msg.z = point.z();
2644 Eigen::Isometry3d result;
2649 result = Eigen::Translation3d(tx, ty, tz) * Eigen::AngleAxisd(rx, Eigen::Vector3d::UnitX()) *
2650 Eigen::AngleAxisd(ry, Eigen::Vector3d::UnitY()) * Eigen::AngleAxisd(rz, Eigen::Vector3d::UnitZ());
2654 result = Eigen::Translation3d(tx, ty, tz) * Eigen::AngleAxisd(rz, Eigen::Vector3d::UnitZ()) *
2655 Eigen::AngleAxisd(ry, Eigen::Vector3d::UnitY()) * Eigen::AngleAxisd(rx, Eigen::Vector3d::UnitX());
2659 result = Eigen::Translation3d(tx, ty, tz) * Eigen::AngleAxisd(rz, Eigen::Vector3d::UnitZ()) *
2660 Eigen::AngleAxisd(rx, Eigen::Vector3d::UnitX()) * Eigen::AngleAxisd(rz, Eigen::Vector3d::UnitZ());
2673 if (transform6.size() != 6)
2679 return convertFromXYZRPY(transform6[0], transform6[1], transform6[2], transform6[3], transform6[4], transform6[5],
2686 convertToXYZRPY(pose, xyzrpy[0], xyzrpy[1], xyzrpy[2], xyzrpy[3], xyzrpy[4], xyzrpy[5]);
2690 double& pitch,
double& yaw)
2697 Eigen::Vector3d vec = pose.rotation().eulerAngles(0, 1, 2);
2705 Eigen::Isometry3d pose_eigen;
2762 Eigen::Vector3d axis;
2763 axis[0] = sin(elevation) * cos(azimuth);
2764 axis[1] = sin(elevation) * sin(azimuth);
2765 axis[2] = cos(elevation);
2767 Eigen::Quaterniond quaternion(Eigen::AngleAxis<double>(
static_cast<double>(angle), axis));
2768 pose = Eigen::Translation3d(pose.translation().x(), pose.translation().y(), pose.translation().z()) * quaternion;
2773 geometry_msgs::Pose pose;
2775 pose.position.x = 0;
2776 pose.position.y = 0;
2777 pose.position.z = 0;
2780 pose.orientation.x = 0;
2781 pose.orientation.y = 0;
2782 pose.orientation.z = 0;
2783 pose.orientation.w = 1;
2789 static const std::size_t NUM_VARS = 16;
2791 for (std::size_t i = 0; i < NUM_VARS; ++i)
2793 if (fabs(pose1.data()[i] - pose2.data()[i]) > threshold)
2804 double d =
static_cast<double>(rand()) / RAND_MAX;
2810 float d =
static_cast<float>(rand()) / RAND_MAX;
2816 int n = max -
min + 1;
2817 int remainder = RAND_MAX % n;
2822 }
while (x >= RAND_MAX - remainder);
2828 std::cout <<
"T.xyz = [" << translation.x() <<
", " << translation.y() <<
", " << translation.z() <<
"]" << std::endl;
2833 Eigen::Quaterniond q(transform.rotation());
2834 std::cout <<
"T.xyz = [" << transform.translation().x() <<
", " << transform.translation().y() <<
", "
2835 << transform.translation().z() <<
"], Q.xyzw = [" << q.x() <<
", " << q.y() <<
", " << q.z() <<
", "
2836 << q.w() <<
"]" << std::endl;
2842 Eigen::Vector3d vec = transform.rotation().eulerAngles(0, 1, 2);
2843 std::cout <<
"transform: [" << transform.translation().x() <<
", " << transform.translation().y() <<
", "
2844 << transform.translation().z() <<
", " << vec[0] <<
", " << vec[1] <<
", " << vec[2] <<
"]\n";
2849 std::cout <<
"T.xyz = [" << transform.translation().x() <<
", " << transform.translation().y() <<
", "
2850 << transform.translation().z() <<
"], R = \n"
2851 << transform.rotation() <<
"\n";