-
Notifications
You must be signed in to change notification settings - Fork 0
Home
user: hello-robot
passwd: hello2020
The official doc: https://docs.hello-robot.com/ https://docs.hello-robot.com/quick_start_guide/
The specific instructions for the battery charger to avoid damage to the battery: https://docs.hello-robot.com/robot_safety_guide/
The ros related environment variables are managed by direnv
and will be automatically loaded when cd
into catkin_ws
. Without special instruction, all commands on both the local machine and the stretch are run from catkin_ws
dir.
When the run.launch is launched, you can connect to the robot and control it using the web app: http://intuitivecomputing.jhu.edu/stretch-web-app/#/controller
The official code are in stretch_ros
repo. Currently on the stretch, the remote origin
is set to https://github.com/yuxiang-gao/stretch_ros (I would suggest forking this repo and replacing the origin
in the local repo with the forked one if you want to make any more updates, otherwise you would need to ask me for access to push) and upstream
is set to https://github.com/hello-robot/stretch_ros.git in order to sync local change (mainly updates to the robot description files based on our modification) while being able to get updates from the official repo.
To update stretch_ros:
cd catkin_ws/src/stretch_ros
# Fetch all the branches of the remote into remote-tracking branches
git fetch upstream
# Make sure that you're on your master branch:
git checkout master
# Rewrite your master branch so that any commits of yours that
# aren't already in upstream/master are replayed on top of that
# other branch:
git rebase upstream/master
The main launch file is sp_navigation/launch/nav_3d.launch
, the maps are stored in the same package, under the maps
directory. The octomap
package needs two maps, 2d map is stored in map_xxx.pgm
and map_xxx.yaml
, the 3d map is stored in octo_xxx.bt
-
On the local machine, ssh into strech by typing
ssh stretch
orssh [email protected]
on the host computer. -
In the ssh terminal, run
roslaunch stretch_navigation mapping.launch rviz:=false
and on the local machine, run rviz -d octomap_mapper.rviz
- Then use keyboard (i,j,l,, for forward left, right, and back) drive the robot around until the map is complete, then save the map by running on stretch:
rosrun map_server map_saver -f /home/hello-robot/catkin_ws/src/sterile_processing/sp_navigation/maps/map_<name>
- Modify the
map_name
argument insp_navigation/launch/nav_2d.launch
.
- On the stretch, run:
roslaunch sp_core robot_nav_bringup.launch
roslaunch sp_navigation octomapping.launch
-
On the local machine, launch rviz, and use
2d Pose estimation
option to give a reasonable starting point, so that the robot's current location align with the 2d map:rviz -d octomap_mapper.rviz
-
Drive the robot around to finish mapping and save on stretch:
rosrun octomap_server octomap_saver -f /home/hello-robot/catkin_ws/src/sterile_processing/sp_navigation/maps/octo_<map_name>.bt
- Modify the
map_name
argument insp_navigation/launch/nav_3d.launch
.
On stretch:
roslaunch sp_core run.launch
On local Ubuntu machine:
rviz -d navigation.rviz
Tips: To find out the map coordinates of a specific location, publish the point using rviz and see the terminal output. An example of the results: Position(0.23,0.808,0.000), Orientation(0,0,0.951,0.31)
When the navigation is launched, run:
rosrun sp_core state_machine_node
To start the workflow, you need to trigger a service call to /sp_sm/start
.
To post orders, publish a message to /sp_sm/post_orders
(disabled now for demo)
To clear orders, trigger call to /sp_sm/clear_orders
All three of these can be accessed through the web-based interface as well. (the order publishing has not been implemented yet, right now it just trigger the /sp_sm/start
service )
There is also a gui for service call:
rosrun rqt_service_caller rqt_service_caller
The states in the state machine are defined in src/custom_states.py
.
There are a few offsets that needs to be calibrated for better grasping:
- Under
MagnetState
wrist_extension_offset_m
forward_offset_m
lift_offset_m
- Under
PostMagnetState
post_grasp_lift_m
joint_wrist_yaw # radians first one: drop INCREASE a little