(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Simulate scene recognition in simulation

Description: In this tutorial we do the recognition of a scene in the simulation.

Tutorial Level: BEGINNER

Description

In this tutorial we do the recognition of a scene in the simulation.

Setup

  1. Set the following settings in asr_next_best_view/param/next_best_view_settings_sim.yaml:

    • radius: set it to "0.15" (default value)

    • sampleSizeUnitSphereSampler: set it to "384" (default)

    • colThresh: set it to "40" (default)

  2. Set the following settings in asr_state_machine/param/params.yaml:

    • mode: set it to "2"
  3. Set config_file_path in asr_fake_object_recognition/param/params.yaml to an XML file in "./config/story_1" or "./config/story_2" respectively, depending on which scenario you want to operate in, in the next step. For instance, if you want to search objects of the scene categories in story_2.sqlite, choose an object configuration in "./config/story_2".
  4. Set dbfilename in asr_recognizer_prediction_ism/param/scene_recognition.yaml to one of the pre-trained databases for story_1 or story_2 respectively in "${CATKIN_WS}/src/asr-ros-pkg/active_scene_recognition/asr_resources_for_active_scene_recognition/scene_recordings" where ${CATKIN_WS} is the absolute path to your catkin workspace.

  5. run: "rosrun asr_resources_for_active_scene_recognition start_modules_sim.sh" and make sure all tmux windows are set up correctly and don't show errors (see section 3 in AsrResourcesForActiveSceneRecognition on how the tmux windows should look like)

  6. Make sure that step 5 launched rviz and rviz looks like this:

rviz_after_sim_launch.png

Tutorial

1. Set the robot position by clicking "2D Pose Estimate" at the upper toolbar and dragging an arrow like on the image below

rviz_sim_pose_estimate.png

2. Open the put_mock tmux window and enter Pan and Tilt values into the prompt. After entering Pan and Tilt and pressing enter, the blue frustum in rviz gets updated. Enter values until the blue frustum includes the objects on the table.

enter_ptu_values.png frustrum_includes_objects.png

3.Enter the rviz state_machine window and press enter

4.Wait some minutes until the robot has found all objects. You can watch this process it in rviz. The robot should visit all three tables with (blue) objects on it. After it has found all objects, the state machine terminates with return code "found_all_objects"

state_machine_done.png

Wiki: asr_resources_for_active_scene_recognition/SimulateSceneRecognition (last edited 2019-12-30 17:34:49 by PascalMeißner)