From adb134ebe0ab922beeffedd945578d8b30a0062a Mon Sep 17 00:00:00 2001
From: "Alan G. Sanchez"
Date: Wed, 6 Jul 2022 09:47:21 -0700
Subject: [PATCH] Changed the way to set the modes of the robot.
---
follow_joint_trajectory.md | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/follow_joint_trajectory.md b/follow_joint_trajectory.md
index 1af9ce5..9bbd6e6 100644
--- a/follow_joint_trajectory.md
+++ b/follow_joint_trajectory.md
@@ -7,22 +7,25 @@ Stretch ROS driver offers a [`FollowJointTrajectory`](http://docs.ros.org/en/api
-Begin by running `roscore` in a terminal. Then set the ros parameter to *position* mode by running the following commands in a new terminal.
+
+
+Begin by running the following command in the terminal in a terminal.
```bash
-# Terminal 2
-rosparam set /stretch_driver/mode "position"
+# Terminal 1
roslaunch stretch_core stretch_driver.launch
```
-In a new terminal type the following commands.
+Switch the mode to *manipulation* mode using a rosservice call. Then run the stow command node.
```bash
-# Terminal 3
+# Terminal 2
+rosservice call /switch_to_manipulation_mode
cd catkin_ws/src/stretch_ros_tutorials/src/
python stow_command.py
```
+
This will send a `FollowJointTrajectory` command to stow Stretch's arm.
### The Code
@@ -158,18 +161,18 @@ Initialize the `StowCommand()` class and set it to *node* and run the `main()` f
-Begin by running `roscore` in a terminal. Then set the ros parameter to *position* mode by running the following commands in a new terminal.
+Begin by running the following command in the terminal in a terminal.
```bash
-# Terminal 2
-rosparam set /stretch_driver/mode "position"
+# Terminal 1
roslaunch stretch_core stretch_driver.launch
```
-In a new terminal type the following commands.
+Switch the mode to *manipulation* mode using a rosservice call. Then run the multipoint command node.
```bash
-# Terminal 3
+# Terminal 2
+rosservice call /switch_to_manipulation_mode
cd catkin_ws/src/stretch_ros_tutorials/src/
python multipoint_command.py
```
@@ -301,18 +304,18 @@ joint_gripper_finger_left: lower_limit = -0.35, upper_limit = 0.165 # in rad
########################################################################
```
-Begin by running `roscore` in a terminal. Then set the ros parameter to *position* mode by running the following commands in a new terminal.
+Begin by running the following command in the terminal in a terminal.
```bash
-# Terminal 2
-rosparam set /stretch_driver/mode "position"
+# Terminal 1
roslaunch stretch_core stretch_driver.launch
```
-In a new terminal type the following commands.
+Switch the mode to *manipulation* mode using a rosservice call. Then run the single joint actuator node.
```bash
-# Terminal 3
+# Terminal 2
+rosservice call /switch_to_manipulation_mode
cd catkin_ws/src/stretch_ros_tutorials/src/
python single_joint_actuator.py
```