ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to verify tf_static - camera on base

asked 2022-10-27 08:42:15 -0500

akumar3.1428 gravatar image

updated 2022-10-30 09:34:53 -0500

lucasw gravatar image

I am using moveit python api to move the robot, I have used easy handeye calibration to calibrate camera on base situation. However, when I am moving the robot using the below code for testing purpose, it is moving with respect to the base frame , not camera frame.

pose_goal = geometry_msgs.msg.Pose()

ls = [[0.6281073954848061,-0.09639226578995838,0.6397201159890544, 0.1375399725278269, 0.13221897080143274, 0.6228175168854516,0.7587484697697222],
      [-0.00687476945115658,-0.0027589787537111565,0.9937305818644332, -0.25790545537067683, -0.2276318777449346, 0.5932445722515949,0.7278251038665686],
      [-0.36180091, 0.054310143,  0.75908843,   -0.25790545, -0.22763187, 0.59324457,0.72782510]]

for i in range(len(ls)):
    pose_goal.position.x = ls[i][0]
    pose_goal.position.y = ls[i][1]
    pose_goal.position.z = ls[i][2]


    pose_goal.orientation.x = ls[i][3]
    pose_goal.orientation.y = ls[i][4]
    pose_goal.orientation.z = ls[i][5]
    pose_goal.orientation.w = ls[i][6]

    print(pose_goal)
    _commander.set_pose_target(pose_goal)
    _commander.set_goal_tolerance(10e-6)

    rospy.loginfo("Planning Trajectory to Pose 1")
    plan1 = _commander.plan()
    rospy.loginfo("Done Planning Trajectory to Pose 1")
    rospy.loginfo("Executing Trajectory to Pose 1")
    success = _commander.go(wait=True)

This is the echo result from tf_static

transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1666877901
        nsecs: 711064918
      frame_id: "world"
    child_frame_id: "ground_plane_box"
    transform: 
      translation: 
        x: 0.0
        y: 0.0
        z: -0.25
      rotation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1666877901
        nsecs: 711069779
      frame_id: "link6"
    child_frame_id: "link_eef"
    transform: 
      translation: 
        x: 0.0
        y: 0.0
        z: 0.0
      rotation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1666877901
        nsecs: 711070380
      frame_id: "world"
    child_frame_id: "link_base"
    transform: 
      translation: 
        x: 0.0
        y: 0.0
        z: 0.0
      rotation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
---
transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1666877901
        nsecs: 964463472
      frame_id: "link_base"
    child_frame_id: "camera_color_optical_frame"
    transform: 
      translation: 
        x: 0.2577706943295264
        y: 1.9663443513784034
        z: 0.8671733835414315
      rotation: 
        x: -0.051832591412976504
        y: -0.7127961533996493
        z: 0.6981660834436676
        w: 0.0424163423105879
---

RQT Graph can be found here https://drive.google.com/file/d/1CXy2...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-10-28 15:27:37 -0500

akumar3.1428 gravatar image

It can be verified by various method like Use rosrun tf tf_echo parent_frame child_frame to see the values and examine it by moving the robot to a known position. Use rosrun tf view_frames to get the graph for debuging.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-10-27 08:42:15 -0500

Seen: 39 times

Last updated: Oct 28 '22