Locations
Description
A location represents a specific pose of the N9 Robot. There are several ways to create and record locations in the IDE. These methods include capturing the current pose of the robot, adding a new module to the project, manually entering either the joint angles or desired the Cartesian (x, y, z) position of the end-effector, or they may be generated as part of a grid.
Locator
The Locator is a list of all the locations defined in the project. Once created, locations may be referenced in the script by the location’s name as it appears in the Locator. In the script, location names are commonly used in arguments passed to a NorthAPI function such as goto(). To access the Locator in the IDE, select View > Locator.
Creating Locations
New locations are created using the Location Dialog.
A special class of location, called a reference location, is added to the Module Locations folder in the Locator when modules are created. Reference locations are not editable.
Capturing Locations
Poses of the physical N9 robot can be captured and stored as locations in the IDE. Use Quick Scripts to home the robot (ctrl + 2) and disable the servos (ctrl + 3). Once the servos are disabled, it is safe to manually pose the robot in the desired position. Press the Capture button below the Locator. A Location Dialog box pre-populated with the joint space coordinates of the robot's pose will appear. Users can further customize the location by giving it a unique name and selecting a tool.
As many positions as desired can be captured as locations while the servos are disabled. To enable servos, simply run the homing script again (ctrl + 2).
Defining a Single Location
To define a new location at a point in task space or by providing joint angles, either left-click on the Locator menu (top right) or right-click anywhere inside the table and select Define New Location. Configure the location as desired in the resulting Location Dialog.
Duplicating Locations
The Duplicate feature allows users to create a new location based on an existing location. To duplicate a location, select the location you wish to copy by left-clicking the location entry in the table and then left-clicking on the Locator menu. Alternatively, duplicate locations by right-clicking on the location you wish to duplicate and selecting Define New Location. A copy of the original location will appear in the Location Dialog and can be configured as desired.
Duplicated locations are fully independent of the locations they were copied from. Editing a duplicated location will not affect the original location.
Editing Locations
Edit locations by selecting the desired location in the Locator and choosing Edit from the menu. This action can also be done by right-clicking the desired entry and choosing Edit, or by double-clicking an entry and navigating to Edit.
Using Locations (Locator.py)
When a project containing one or more location is first saved, a file named Locator.py is generated in the project directory. The file is updated upon each subsequent save, simulation, or run of the project. The Locator.py file creates a four-element Python list for every location in the table. The four elements in each location list represent the four axis’ joint space coordinates (Gripper, Elbow, Shoulder, Z-Axis) in that location.
Users can import all locations from the Locator.py file into a given script using the wildcard character (*). To import all names from the Locator, include the following line at the top of the script:
from Locator import *
If a script is not saved in the same directory as the Locator.py file, users may need to adjust the import syntax.
Once a location is imported and available to use in a script, users can pass a location list as the first argument to the goto family of commands (e.g., goto(...), goto_safe(...), goto_xy_safe(...)). The following example commands can be used to move the N9 to the given location.
IDE Guides