This tutorial describes how to create a few simple motions using example scripts from the Intera Motion Interface.
Motion Interface Examples
New in Intera SDK 5.2!
The Motion Interface enables the user to easily generate smooth motions for Sawyer by specifying a sequence of waypoints: the motion controller on Sawyer will automatically generate and run a trajectory that passes through the waypoints. The user can specify a variety of options, such as a maximum speed or requiring that the endpoint move on a linear path between the waypoints.
Go to Joint Angles
The go_to_joint_angles script is perhaps the simplest way to use the motion interface: it moves the arm from its current position to some target set of joint angles. Note that this script will not plan around self-collisions or obstacles.
Print the arguments that can be passed to the script.
Run the script with default parameters: move at a moderate speed to a configuration where the arm is in front of the robot with the elbow up.
Run the script with a few common arguments:
- Set the target joint angles (ordered j0 through j6):
-q -0.2 0.1 0.1 0.2 -0.3 0.2 0.4
- Set the speed ratio:
- Set the acceleration ratio:
Note that the speed and acceleration ratios are both scalar values on the range 0 to 1. The actual limits that are used in planning are equal to the maximum that each joint can achieve, scaled by the ratio. Advanced users can set kinematic limits in a more direct way using the
Go to to Cartesian Pose
The go_to_cartesian_pose moves the robot from its current position to a target pose, with the end-effector following a linear path.
Display the help file for the script, listing all possible arguments.
Go to position (x=0.4, y=-0.3, z=0.18 meters) with a quaternion orientation (0, 1, 0, 0) and tip name right_hand. The current position or orientation will be used if only one is provided explicitly.
Go to joint angles: 0.0 -0.9 0.0 1.8 0.0 -0.9 0.0 using default settings. If a Cartesian pose is not provided then forward kinematics will be used to compute it. If a Cartesian pose is provided, then the joint angles will be used to bias the nullspace (elbow orientation) during motion planning.
Jog arm with Relative Pose (in tip frame). In this case, move x=0.01, y=0.02, z=0.03 meters in translation and rotate roll=0.1, pitch=0.2, yaw=0.3 radians in orientation from the current end effector frame. The fixed position and orientation paramters will be ignored if provided.
Send Random Trajectory
The send_random_trajectory script is used to perform a random walk in joint space with the robot arm. It should be used with caution, as the robot does not know about its surroundings: make sure that there is plenty of space around the robot before running!
Provide the help file for the script, as well as default arguments.
Send a random joint trajectory with 5 waypoints, using a speed ratio of 0.5 for all waypoints. Use default random walk settings.
Send a random trajectory with default trajectory settings. Use a maximum step distance of 10% of the joint range and avoid the upper and lower joint limits by a boundary of 20% of the joint range.