Hi,
I am using ur10 ros driver to get the position of a mounted drilling pin on the end-effector of the robot. I want to do a transformation between the end-effector (tool0_controller
) and the drilling pin frames. I measured the distance and orientation between them and tried to do a static transformation as the following but can't see any changes when I echo the /tf
topic
<node pkg="tf" type="static_transform_publisher" name="tool0_controller" args="
0.5 0 2
0.707 0.707 0 0
/base_link/base /base_link/base/tool0_controller 500"/>
Any clue?
Edit: Simply the question is that I am trying to control a drilling pin that is mounted on the end-effctor of the ur10 robot (tool0_controller frame). I tried the static transformation above but it wasn't working
I tried to add a new frame to tool0_controller and this is the code I am using but the problem here is that: the pose published by drillingPin frame is relative to the tool0_controller not to the base.
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <geometry_msgs/PoseStamped.h>
int main(int argc, char** argv){
ros::init(argc, argv, "my_tf_broadcaster");
ros::NodeHandle node;
tf::TransformBroadcaster br;
tf::Transform transform;
ros::Rate rate(10.0);
while (node.ok()){
transform.setOrigin( tf::Vector3(0.0, 2.0, 0.0) );
transform.setRotation( tf::Quaternion(0, 0, 0,1) );
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "tool0_controller", "drillingPin"));
rate.sleep();
}
return 0;
};
I am pretty sure this is a common application to universal robots but can't find useful tutorials. Your help is highly appreciated!
Originally posted by raghad.husari on ROS Answers with karma: 3 on 2019-02-25
Post score: 0
Original comments
Comment by gvdhoorn on 2019-02-25:
Can you clarify what you want to do exactly? You cannot "override" a TF frame being published by ur_modern_driver
, so that wouldn't work.
I'm also confused by this:
/base_link/base /base_link/base/tool0_controller
which frames are these supposed to be?
Finally: 500
is the period, not ..
Comment by gvdhoorn on 2019-02-25:
.. the frequency/update rate, so this is only publishing at 2 Hz. Probably not what you intended.
Comment by raghad.husari on 2019-02-25:
I mounted a drilling pin on the end-effector and want to get the position of that drilling pin from the ur driver. The position of the drilling pin is located at specific distance relative to the tool0-controller frame, let's say at x=0.5, y=0 and z=2 with no orientation.
Comment by raghad.husari on 2019-02-25:
the parent frame is /base_link/base and the child frame is /base_link/base/tool0_controller, I am trying to apply a static transformation to shift the child frame to the drilling pin position
Comment by gvdhoorn on 2019-02-25:
tool0_controller
is a frame that is published by ur_modern_driver
, you cannot "shift it". Your publisher will conflict with the driver.
I'm still confused, but I would recommend you introduce a new frame that encodes the location of your drilling pin relative to tool0_controller
.
Comment by raghad.husari on 2019-02-27:
Please see my reply below @gvdhoorn