lihuang3 / ur5_ROS-Gazebo

Universal Robot (UR5) Pick and Place Simulation in ROS-Gazebo with a USB Cam and Vacuum Grippers
441 stars 133 forks source link

Conversion of pixel coordinate system and manipulator coordinate system #22

Closed richardsanqi closed 4 years ago

richardsanqi commented 4 years ago

hello,lihuang,how do you just use camera to get the real point to make the robot move ?i know it needs calibration.

lihuang3 commented 4 years ago

@richardsanqi Those are just coordinates in pixel space, not in real 3D space.

richardsanqi commented 4 years ago

@richardsanqi Those are just coordinates in pixel space, not in real 3D space.

but how you make the robot just to catch the red box.I learn your code just two days,i can't find the tf transofm just like this code this->tf_camera_to_robot.lookupTransform("/base_link", "/camera_link", ros::Time(0), (this->camera_to_robot_));

lihuang3 commented 4 years ago

@richardsanqi Objects are assumed to be on the flat plane, so their height is fixed. We only need to take care of the horizontal plane locations.

richardsanqi commented 4 years ago

@richardsanqi假定对象位于平面上,因此它们的高度是固定的。我们只需要照顾水平面的位置。 thank you,but i have someNot sure. in ur5_mp.py file the code wpose.position.y=self.erroy_y*0.04/105 just mean change to the robot end link coordinates ? and how did you get the 0.04/105, did you use the red box width and length to calculate the number,so as 0.05/105.the last question is how did you get the number "195" self.error_y=self.cy-(h/2+195) in ur5_vision.py

lihuang3 commented 4 years ago

@richardsanqi Those are just experimental numbers from trial and error.