Skip to content

4th year project on Toyota HSR pick-and-place motion planning

Notifications You must be signed in to change notification settings

ori-drs/hsr_driveby_full

 
 

Repository files navigation

hsr_driveby_full

REQUIREMENTS:

  • Ubuntu 20.04 & ROS Noetic
  • Follow the HSR simulator installation instructions on the internal wiki

Set up workspace and install required dependencies:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin config --extend /opt/ros/noetic
catkin config --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd ~/catkin_ws/src
git clone git@github.com:ori-drs/hsr_driveby_full.git
git clone https://github.com/wxmerkt/hsr_description.git
git clone https://github.com/ToyotaResearchInstitute/hsr_meshes.git
git clone https://github.com/hsr-project/tmc_wrs_gazebo.git
sudo apt install ros-noetic-exotica-examples

Workaround for MoveIt v1.1.6 regression

MoveIt version 1.1.6 for ROS Noetic is currently broken due to a regression in the scene description format. This issue does not appear with v1.1.5 or v1.1.7. If you have v1.1.6 installed, please manually compile the latest master of MoveIt on your machine:

mkdir ~/git
cd ~/git && git clone https://github.com/ros-planning/moveit.git --branch noetic-devel
cd ~/catkin_ws/src && ln -s ~/git/moveit/moveit_core
catkin b --continue-on-failure -s

INSTRUCTIONS

Driveby table in Gazebo

Description

  • Uses AICO solver with a given base trajectory to pick up a soda_can off of a table.
  • Assumed location of soda_can is known, obstacle locations known, and the base trajectory is valid and approaches the soda can

Run

  • Start the gazebo simulation: roslaunch hsr_driveby_demo hsrb_empty_world.launch
  • Wait for gazebo to finish loading
  • Press play to start the simulation
  • In an new terminal window, go to scripts directory: roscd hsr_driveby_full/scripts/rob_stuff/
  • 3 choices:
      1. Run a saved trajectory output of AICO solver ./hsrb_pickup.py
      1. Rerun AICO solver ./hsr_meeting_table_aico
      1. comment and uncomment line in main function.

Video

  • see driveby_pickup.mp4

Driveby table with AprilTags

Description

  • Tried to incorporate AprilTags to identify position of sodacan
  • Warning: this code may give you an aneurysm.
  • Detects locations of AprilTags. Applies transform to get location of table center and bottle center.
  • Finds the starting base pose of the HSR from the edge of the table and the bottle position. Filters out all noisy frames by checking of the and y of the frame are parallel to the world frame, so lots of lost data.
  • Run the controller a bunch of times until it coincides with a moment where the starting base pose was just published.
  • There is a chance the HSR won't drop the soda can or collide with the table.

Run

After sourcing the workspace, make sure that GAZEBO_MODEL_PATH is set by running echo $GAZEBO_MODEL_PATH. If it isn't (which can happen if you use a shell different than bash or zsh), set the variable by running ``export GAZEBO_MODEL_PATH=$(rospack find hsr_driveby_full)/models:$(rospack find tmc_gazebo_worlds)/models:$GAZEBO_MODEL_PATH`

  • roslaunch hsr_driveby_full hsrb_empty_world_april_tag_metrics.launch`
  • in a separate terminal window: rosrun hsr_driveby_full object_positions.py
  • in a separate terminal window: rosrun hsr_driveby_full trajectory_start_end.py -- check that the object detections from AprilTag are stable. If they are not (e.g. if the markers are too small), no start and end transforms will be published.
  • in a separate terminal window: roscd hsr_driveby_full/scripts/rob_stuff ; python3 hsrb_exotica_python_script.py
  • by default, it should run a saved trajectory. comment and uncomment a line in the main function of hsrb_exotica_python_script.py.

Video

  • see go_to_location.movie.mp4 and go_to_location.movie_2.mp4

Pick and Place Planner

Description

  • Driveby pick up of soda can and driveby placing of soda can. In planning scene. Working on running in Gazebo. Kinda screwed up on converting SDF => Scene files. world frame offest by 90 degrees in xy plane. Need to fix /resources/sdf_to_scene_15_in_world_v2
  • uses IK solver to find base positions for pickup and placing pose.
  • RRTConnect to go from base poses: start_pose => grasp_pose => intermediate_pose (some pose between the start and placing location that acts as the end pose of the picking segment and the start pose of the placing segment) => place_pose => start_pose
  • AICO solver to solve for grasping and placing motions.
  • need to specify start pose, intermediate pose, soda_can location, target_placing location, duration_of_gripper_opening/closing, and timestep for AICO solver. These are all currently hardcoded.

Run

  • In a terminal, start roscore: roscore
  • In a separate terminal, start rviz for the hsr: roscd hsr_driveby_full/resources rviz -d hsr_driveby.rviz
  • In a separate terminal, run the planner: roscd hsr_driveby_full/scripts/rob_stuff ./hsr_wrs_world_pick_and_place_full

Video

  • see hsr_pick_and_place.mp4
  • hsr drive-by pick-and-place in planning space
Drive-by pick-up from IKEA Lynnmon table

Lynnmon

Drive-by pick-up from IKEA Nyboda table

Nyboda

4th Year Project Paper

About

4th year project on Toyota HSR pick-and-place motion planning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.5%
  • MATLAB 11.4%
  • Other 1.1%