Vive workspace for Eurobot
Contributors: Angus and YuShan
# create a new catkin_workspace, if you need to.
cd ~/catkin_workspace/src
git clone git@github.com:YuShan122/Vive.git
cd Vive
chmod 777 vive_install.sh
./vive_install.sh
# If error occurs
# sudo apt-get install qtbase5-dev
# sudo apt-get install qtdeclarative5-dev
# sudo apt-get install libarmadillo-dev
cd ~/catkin_workspace
catkin_make
# if error occurs, compile "obstacle_detector" first as follow:
catkin_make -DCATKIN_WHITELIST_PACKAGES="obstacle_detector"
catkin_make -DCATKIN_WHITELIST_PACKAGES="vive"
- Set up three lighthouses.
- Check dump path in
vive_calibrate.cpp, line 278. Remembercatkin_makeif the code is modified. - Open
vive_calibrate.launch. Check and modify value of params:calibrate_trackerside. - Put the tracker on the playground.
- Position: (1.5, 1.0) (the center of the playground), and
- Orientation: LED facing right shorter side of the playground(the line x=3).
- Launch.
roslaunch vive vive_calibrate.launch
- Wait untill the numbers printed to be stable.
- If you don't want to replace the last calibration:
# open another terminal rosparam set /vive_calibrate/dump_blue false rosparam set /vive_calibrate/dump_green false - Press
ctrl+Cto stop the program.vive/param/vive_calibrate.yamlwill be replaced by new calibration.
- Set up three lighthouses.
- Check dump path in
vive_calibrate2.cpp, line 380. Remembercatkin_makeif the code is modified. - Open
vive_calibrate2.launch, check and modify args:side_tracker_. - Put the tracker on the playground.
- Launch.
roslaunch vive vive_calibrate2.launch
# open another terminal
rosrun vive vive_calibrate_contrl
- There are four points; the position of the points are set in
vive_calibrate.yaml->pos_true_xandy. - Input numbers with
vive_calibrate_contrl, and put tracker on the positionvive_calibrate2gives you. - When finishing one point, before moving tracker, input another number in
vive_calibrate_contrl. - Then move the tracker to next posistion.
- If all four points are finished, close
vive_calibrate2(by input9or pressctrl+C). The calibration data would be written intovive_calibrate.yaml. - Finished.
- Open
vive_trackerpose.launch, check and modify args:robot1_active/robot2_activerobot1_tracker/robot2_trackerside: 'g' or 'b'. Note: We didn't use this string param in EUROBOT2023, but an int param/side. 1 green, 0 blue. This param is set by other.ekf_: running with ekf or not. If true, the program would compare the position of vive and ekf.print_world: Print information ofvive_worldor not. Note: SimpleApi logger invive_worldwould always print information.
- Launch.
rosparam set /side 0 # blue, or
rosparam set /side 1 # green
roslaunch vive vive_trackerpose.launch
- Open
vive_rival_1.launch/vive_rival_2.launch, check and modify args:rival1_active/rival2_activerival1_tracker/rival2_trackerside: 'g' or 'b'. Note: We didn't use this string param in EUROBOT2023, but an int param/side. 1 green, 0 blue. This param is set by other.lowpass_active_: to determined the lowpass filter active.
- Launch.
rosparam set /side 0 # blue, or
rosparam set /side 1 # green
roslaunch vive vive_rival_1.launch # or
roslaunch vive vive_rival_2.launch