diff --git a/README.md b/README.md index 56aab7d..8a721cb 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,53 @@ Thanks very much to Tiziano Fiorenzani for his [ROS 1 tutorial](https://www.yout One other thing to be wary of: this is a ROS/ament Python package, which means the launch and config files contained will NOT be linked with the `--symlink-install` command for colcon, and will need to be rebuilt after changes. +Remove warning triggers regarding setuptools by downgrading the version: +`pip install setuptools==58.2.0` ## Getting started A launch file and example parameters are provided. +Clone this repo into your ~/dev_ws/src/ folder: +``` +git clone git@github.com:joshnewans/ball_tracker.git +``` + +Preliminary tuning mode (remember to source foxy and workspace): +``` +ros2 run ball_tracker detect_ball --ros-args -p tuning_mode:=true -r image_in:=camera/image_raw +``` +rviz2: add `Image` -> `Topic: /image_out` + +Record those parameters! + +Get detect ball's point measurements: +``` +ros2 topic echo /detected_ball +``` + +3D ball location estimation: +``` +ros2 run ball_tracker detect_ball_3d +``` +rviz2: add `Marker` -> `Topic: /ball_3d_marker` + +Follow the ball: +``` +ros2 run ball_tracker follow_ball --ros-args -r cmd_vel:=cmd_vel_tracker +``` + +Copy `ball_tracker_params_example.yaml` into your main ros package config folder. +Rename it to `ball_tracker_params_sim.yaml` with the appropriate tuning parameters. + +Then you can launch: +``` +ros2 launch ball_tracker ball_tracker.launch.py params_file:=src//config/ball_tracker_params_sim.yaml enable_3d_track:=true +``` + ## Nodes TODO Document them ## Known issues -- Can't easily detect red due to hue wrap. If you need to detect red robustly you'll need to go in and mess with the HSV filtering. \ No newline at end of file +- Can't easily detect red due to hue wrap. If you need to detect red robustly you'll need to go in and mess with the HSV filtering. diff --git a/setup.cfg b/setup.cfg index 55b3978..4ba3608 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [develop] -script-dir=$base/lib/ball_tracker +script_dir=$base/lib/ball_tracker [install] -install-scripts=$base/lib/ball_tracker +install_scripts=$base/lib/ball_tracker