Browse Source

Merge branch 'master' into feature/pluggable_end_effector

feature/pluggable_end_effector
hello-binit 3 years ago
parent
commit
3ef75f4a57
2 changed files with 16 additions and 13 deletions
  1. +6
    -7
      stretch_core/nodes/stretch_driver
  2. +10
    -6
      stretch_description/README.md

+ 6
- 7
stretch_core/nodes/stretch_driver View File

@ -376,6 +376,12 @@ class StretchBodyNode:
mode = rospy.get_param('~mode', "position")
rospy.loginfo('mode = ' + str(mode))
if mode == "position":
self.turn_on_position_mode()
elif mode == "navigation":
self.turn_on_navigation_mode()
elif mode == "manipulation":
self.turn_on_manipulation_mode()
self.broadcast_odom_tf = rospy.get_param('~broadcast_odom_tf', False)
rospy.loginfo('broadcast_odom_tf = ' + str(self.broadcast_odom_tf))
@ -466,13 +472,6 @@ class StretchBodyNode:
self.joint_trajectory_action = JointTrajectoryAction(self)
self.joint_trajectory_action.server.start()
if mode == "position":
self.turn_on_position_mode()
elif mode == "navigation":
self.turn_on_navigation_mode()
elif mode == "manipulation":
self.turn_on_manipulation_mode()
self.switch_to_manipulation_mode_service = rospy.Service('/switch_to_manipulation_mode',
Trigger,
self.manipulation_mode_service_callback)

+ 10
- 6
stretch_description/README.md View File

@ -35,22 +35,26 @@ Some of the tools found in the [Stretch Body Tool Share](https://github.com/hell
```bash
>>$ cd ~/repos
>>$ git clone https://github.com/hello-robot/stretch_tool_share
>>$ cd stretch_tool_share
>>$ cd stretch_tool_share/<tool name>
>>$ cp stretch_description/urdf/* ~/catkin_ws/src/stretch_ros/stretch_description/urdf/
>>$ cp stretch_description/meshes/* ~/catkin_ws/src/stretch_ros/stretch_description/meshes/
```
Next add the xacro for the particular tool to /stretch_description/urdf/stretch_description.xacro. Then you can generate and preview the uncalibrated URDF:
Next add the xacro for the particular tool to `/stretch_description/urdf/stretch_description.xacro`. Then you can generate and preview the uncalibrated URDF:
```
>>$ rosrun stretch_calibration update_uncalibrated_urdf.sh
```bash
>>$ cd ~/catkin_ws/src/stretch_ros/stretch_description/urdf
>>$ cp stretch.urdf stretch.urdf.bak
>>$ cp stretch_uncalibrated.urdf stretch.urdf
>>$ rosrun stretch_calibration update_urdf_after_xacro_change.sh
```
Now visualize the new tool
```bash
>>$ roslaunch stretch_calibration simple_test_head_calibration.launch
```
You will then want to calibrate your URDF as described in the [URDF calibration](https://github.com/hello-robot/stretch_ros/tree/master/stretch_calibration) documentation.
## License and Patents

Loading…
Cancel
Save