Skip to content

Commit

Permalink
Rename MoveToJointState to MoveToWaypoint in python sdk (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
marioprats authored Aug 31, 2023
1 parent b2b1994 commit 1473f69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Let's now test the SDK to see if we can execute and cancel MoveIt Studio Objecti
There are three example scripts provided:
* `start_blocking.py`: starts an Objective and waits until the Objective finishes execution.
* `start_stop_async.py`: starts an Objective, waits for a user-defined number of seconds, and then cancels the running Objective.
* `move_to_joint_state.py`: runs the "Move to Joint State" Objective, using a parameter override to set the waypoint to move to.
* `move_to_waypoint.py`: runs the "Move to Waypoint" Objective, using a parameter override to set the waypoint to move to.

To run the `Open Gripper` Objective, let's use `start_blocking.py` since this Objective shouldn't take long to complete:

Expand All @@ -57,12 +57,12 @@ We will let this Objective run for 10 seconds:
ros2 run moveit_studio_py start_stop_async.py "3 Waypoints Pick and Place" 10
```

To run the `move_to_joint_state.py` example, a valid waypoint must be provided.
To run the `move_to_waypoint.py` example, a valid waypoint must be provided.
A list of pre-defined waypoints can be found in the ui's "Endpoint" tab.
The following command would move the robot arm to the `Look at Left Table` waypoint:

```
ros2 run moveit_studio_py move_to_joint_state.py "Look at Left Table"
ros2 run moveit_studio_py move_to_waypoint.py "Look at Left Table"
```

If you look at the `Objectives` tab in the MoveIt Studio UI, you should see these Objectives starting/stopping successfully.
2 changes: 1 addition & 1 deletion moveit_studio_py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ament_python_install_package(
install(PROGRAMS
examples/start_blocking.py
examples/start_stop_async.py
examples/move_to_joint_state.py
examples/move_to_waypoint.py
DESTINATION lib/${PROJECT_NAME}
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# Run the "Move to Joint State" Objective with the waypoint defined as a parameter override.
# Run the "Move to Waypoint" Objective with the waypoint defined as a parameter override.

# Copyright 2023 Picknik Inc.
#
Expand Down Expand Up @@ -39,7 +39,7 @@


def main():
__OBJECTIVE_NAME = "Move to Joint State"
__OBJECTIVE_NAME = "Move to Waypoint"

parser = argparse.ArgumentParser()
parser.add_argument("waypoint_name", type=str, help="Name of waypoint to move to.")
Expand All @@ -50,7 +50,7 @@ def main():
waypoint_override.description.name = "waypoint_name"
waypoint_override.description.type = BehaviorParameterDescription.TYPE_STRING
waypoint_override.string_value = args.waypoint_name
waypoint_override.behavior_namespaces = ["move_to_joint_state"]
waypoint_override.behavior_namespaces = ["move_to_waypoint"]

rclpy.init()

Expand Down

0 comments on commit 1473f69

Please sign in to comment.