https://github.com/ori-drs/hsr_driveby_full
System requirements:
- ROS Noetic
- Follow the HSR simulator installation instructions on the Installing HSR Packages and Simulator Locally
sudo apt install python3-catkin-tools
Set up workspace and install required dependencies:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone git@github.com:zhlzhl123/hsr.git
git clone https://github.com/ToyotaResearchInstitute/hsr_meshes.git
sudo apt install ros-noetic-exotica-examples
catkin buildPick up a soda can in a fixed place without stopping.
- Start the gazebo simulation:
roslaunch hsr123 basic.launch - Wait for gazebo to finish loading and press play to start the simulation
- In an new terminal window, run
hsr123/src/basic_traj_follow.py
- Start the rviz if gazebo isn't running:
roslaunch hsr123 my_rviz.launch - In an new terminal window, source
devel/setup.bashand runhsr123/src/basic_traj_aico.py
Pick up a soda can in a fixed place with apriltag. A modified version of the basic one above, remove the hardcoded part.
- Srat the gazebo simulation,
roslaunch hsr123 detect.launch - Choice 1: Run function
detect_traj_follow(4.5, 0.15, 2.5, new_traj=1)inhsr123/src/detect_traj_follow.pyto generate and run the new trajectory. - Choice 2: Run
hsr123/src/detect_traj_aico.pyfirst to generate the trajectory, and then run functiondetect_traj_follow(4.5, 0.15, new_traj=0)inhsr123/src/detect_traj_follow.pyto run the trajectory
Pick up a soda can in a random place with apriltag from a random start place. Using IK, AICO and RRT solver.
- Set the starting and ending position of the robot. Set the position of the can since the detection is not working well in gazebo.
- Start the rviz if gazebo isn't running:
roslaunch hsr123 my_rviz.launch, runhsr123/src/pickup_plan.pyto generate all the trajectories needed. - Run the trajectory in gazebo, firstly start the gazebo with
roslaunch hsr123 pickup.launch, then runhsr123/src/pickup_follow.py.
Pick up a soda can in a random place with yolo v5 detection. Robots start from a random place. Using IK, AICO and RRT solver. (Download yolov3.weights into hsr123/src/image/yolo_models before using)
- Start the gazebo with
roslaunch hsr123 yolo.launch - Run
hsr123/src/yolo.py. (Detect->Plan->Pick and Drop)
- In
hsr123/src/yolo.py, setgazebo=0, setcan_position_listmanually, choose the debug version at the end by commenting and uncommenting. - Run
roslaunch hsr123 my_rviz.launch, then runhsr123/src/yolo.py.