4 #include <ram_utils/GetTrajectoryFrame.h> 5 #include <ram_utils/GetStartPose.h> 6 #include <ram_utils/GetTool.h> 20 ram_utils::GetStartPose::Response &res)
28 ram_utils::GetTrajectoryFrame::Response &res)
35 bool getTool(ram_utils::GetTool::Request &,
36 ram_utils::GetTool::Response &res)
64 ros::init(argc, argv,
"frames_tf_broadcaster");
86 tool.orientation.x = 0;
87 tool.orientation.y = 0;
88 tool.orientation.z = 0;
89 tool.orientation.w = 1;
92 geometry_msgs::TransformStamped transform_stamped;
108 transform_stamped.header.frame_id =
"base";
109 transform_stamped.child_frame_id =
"trajectory_frame";
122 transform_stamped.header.frame_id =
"trajectory_frame";
123 transform_stamped.child_frame_id =
"start_pose";
124 transform_stamped.transform.translation.x =
start_pose.position.x;
125 transform_stamped.transform.translation.y =
start_pose.position.y;
126 transform_stamped.transform.translation.z =
start_pose.position.z;
127 transform_stamped.transform.rotation =
start_pose.orientation;
136 transform_stamped.header.frame_id =
"start_pose";
137 transform_stamped.child_frame_id =
"tool_orientation";
138 transform_stamped.transform.translation.x =
tool.position.x;
139 transform_stamped.transform.translation.y =
tool.position.y;
140 transform_stamped.transform.translation.z =
tool.position.z;
141 transform_stamped.transform.rotation =
tool.orientation;
bool getStartPose(ram_utils::GetStartPose::Request &, ram_utils::GetStartPose::Response &res)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
std::unique_ptr< ros::NodeHandle > nh
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
geometry_msgs::Pose start_pose
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
geometry_msgs::Pose trajectory_frame
bool getTool(ram_utils::GetTool::Request &, ram_utils::GetTool::Response &res)
std::mutex trajectory_frame_mutex
int main(int argc, char **argv)
void updateStartPoseTFCallback(const geometry_msgs::Pose::ConstPtr &msg)
bool getTrajectoryFrame(ram_utils::GetTrajectoryFrame::Request &, ram_utils::GetTrajectoryFrame::Response &res)
void updateToolTFCallback(const geometry_msgs::Pose::ConstPtr &msg)
std::mutex start_pose_mutex
void updateTrajectoryFrameTFCallback(const geometry_msgs::Pose::ConstPtr &msg)
ROSCPP_DECL void spinOnce()