5#include <SimoxUtility/math/pose/pose.h>
6#include <VirtualRobot/Nodes/RobotNode.h>
28 draw(gc, l, simox::color::GlasbeyLUT::at(_color_offset, 255));
34 draw(gch, l, simox::color::GlasbeyLUT::at(_color_offset, 255));
55 const auto& s = side(gch);
56 const std::string name =
"grasp_" + s.name +
"_" + std::to_string(_color_offset++);
58 .file(s.hand_model_package, s.hand_model_path)
78 draw(side.name, side, l, ax_len, ax_width, color_up, color_trans);
92 side.nh_arm_w_rob.getTCP()->getGlobalPose(),
102 const Eigen::Matrix4f& gpose,
108 draw(
"", side, l, gpose, ax_len, ax_width, color_up, color_trans);
115 const Eigen::Matrix4f& gpose,
121 const Eigen::Vector3f hand_up =
122 simox::math::orientation(gpose) * side.hand_up.normalized() * ax_len;
124 const Eigen::Vector3f transversal_outward =
125 simox::math::orientation(gpose) * side.hand_transverse.normalized() * ax_len;
127 const Eigen::Vector3f tcp_pos = simox::math::position(gpose);
132 .fromTo(tcp_pos, tcp_pos + hand_up));
136 .fromTo(tcp_pos, tcp_pos + transversal_outward));
139 const grasp_candidate_drawer::side_data&
150 const auto nh =
rnh->getArm(s);
151 const auto nh_w_rob = nh.addRobot(
robot);
152 auto&
data = _sides[s];
154 data.hand_model_package = nh.getHandModelPackage();
155 data.hand_model_path = nh.getHandModelPath();
156 data.tcp_2_hroot = nh_w_rob.getTcp2HandRootTransform();
Eigen::Vector3f getApproachVector() const
Eigen::Matrix4f getGraspPoseInGlobal() const
Eigen::Vector3f getGraspPositionInGlobal() const
const grasping::GraspCandidatePtr getGraspCandidate() const
DerivedT & pose(Eigen::Matrix4f const &pose)
Robot & overrideColor(Color c)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class RobotNameHelper > RobotNameHelperPtr
VirtualRobot::RobotPtr robot
void draw(const armarx::grasping::GraspCandidatePtr &gc, armarx::viz::Layer &l)
armarx::RobotNameHelperPtr rnh
grasp_candidate_drawer(armarx::RobotNameHelperPtr rnh, const VirtualRobot::RobotPtr &robot)
void add(ElementT const &element)