How to Move the robot in joint and Cartesian Space?
I wanted to deploy the Ur5 robot in the gazebo and move the robot in joint and cartesian space using python code.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
I wanted to deploy the Ur5 robot in the gazebo and move the robot in joint and cartesian space using python code.
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!
Asked: 2022-01-10 05:59:20 -0500
Seen: 426 times
Last updated: Jan 10 '22