![]() |
Using the Control script
Description: We use the control script to set a startposition/scene configuration.Tutorial Level: BEGINNER
Contents
Description
We use the control script to set a startposition/scene configuration.
Setup
- run rosrun asr_resources_for_active_scene_recognition start_modules_sim.sh.
make sure all modules are working, the tmux "control" window should show the python repl prompt ">>>".
- make sure the state_machine's mode is set to 2/indirect search only.
Tutorial
- CAUTION: make sure you saved parameters/launch files in asr_recognizer_prediction_ism, asr_world_model and asr_fake_object_recognition, since this might overwrite your settings. In the "control" window run setConfig(cfg_may25) to change the scene configuration, this will automatically restart the required tmux panes/modules.
- (optional) with getCurrentConfig() you can get the currently set config, if a config of cfgs is set. the startPositios attribute is a list with some start poses to set.
- ensure that the tmux "ptu_mock" window is working and the ptu client (cli_controll.py) asks for "Pan?", if you get ptu errors later, wait here a bit more.
- run setDefaultPos() to move the robot to the first startposition of the current config.
(optional) run startRecognition() to start all recognizers and to find out which objects can be found in the current view. Something like "Smacks': 7, 'VitalisSchoko': 7}" should be returned. The result contains a number of recognitions per object type.
- run startSM to start the state machine.
- (optional) the waitSMFinished() function waits/blocks until the state machine terminates.
- getSMResult() returns the result which can be seen in the "state_machine" tmux window, when the state_machine is finished.