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

How to Move the robot in joint and Cartesian Space?

asked 2022-01-10 05:59:20 -0500

vidu98 gravatar image

updated 2022-01-10 05:59:47 -0500

I wanted to deploy the Ur5 robot in the gazebo and move the robot in joint and cartesian space using python code.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-01-10 06:19:29 -0500

sniegs gravatar image

updated 2022-01-10 08:20:43 -0500

I would suggest going through these MoveIt! tutorials!

Edit 1(updated context): In the case of a UR5 robot, you would first need to look into the UR robot driver as it is essential for using UR robots with ROS.

For using Python, you would need to use move_group = moveit_commander.MoveGroupCommander() and with that you would be able to plan in the joint space like so (copied from the tutorial):

joint_goal = move_group.get_current_joint_values()

joint_goal[0] = 0 #[0] represents the joint of the robot, value is in radians

move_group.go(joint_goal, wait=True)

and in cartesian space like so (copied from the tutorial):

waypoints = []

wpose = move_group.get_current_pose().pose

wpose.position.z -= scale * 0.1 # First move up (z)

wpose.position.y += scale * 0.2 # and sideways (y)

waypoints.append(copy.deepcopy(wpose))

(plan, fraction) = move_group.compute_cartesian_path(waypoints, 0.01, 0.0) # waypoints to follow # eef_step # jump_threshold

As for using gazebo for that, this is also mentioned here!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-01-10 05:59:20 -0500

Seen: 442 times

Last updated: Jan 10 '22