Create Testing Folder

First, you need to create a new Testing folder:

  1. Locate the GME Browser window.
  2. Right-click on the RootFolder and select Insert Folder ‣ Testing.
  3. Name this new folder ROS_Pub_Sub_Tutorial_Test.

Create and Run Test Bench

Now you have created a simple model consiting of a Talker_and_Listener Component Assembly containing connected Talker and Listener Components.

In order to generate runtime artifacts from this model, you need to create a Test Bench containing the Talker_and_Listener Component Assembly.

  1. Locate the GME Browser window.

  2. Right-click on the ROS_Pub_Sub_Tutorial_Test Testing folder and select Insert Model ‣ Test Bench.

  3. Name this new Test Bench Talker_and_Listener_Test.

    ../../_images/gme_browser_talker_listener_tb.png
  4. Double left-click the new Talker_and_Listener_Test Test Bench to open its canvas.

Add Talker_and_Listener Component Assembly

  1. Locate the GME Browser window.

  2. Right-click on the RootFolder > ROS_Pub_Sub_Tutorial_Asm > Talker_and_Listener Component Assembly and select Copy.

  3. Inside the Talker_and_Listener_Test Test Bench canvas, right-click and select Paste Special ‣ As Reference.

  4. The Select Reference Role Type window will appear. Select TopLevelSystemUnderTest and then OK

    ../../_images/tb_canvas_comp_asm1.png

Add Workflow

Now you need to add a workflow. Workflows are groups of defined executables and scripts that interpret the model, generate artifacts, and(or) run other programs as needed.

For this tutorial, you will be adding the GenerateLaunch Workflow which is already included in the Testing directory.

  1. Locate the GME Browser window.

  2. Right-click on the RootFolder > Testing > WorkflowDefinitions > GenerateLaunch Workflow and select Copy.

    ../../_images/gme_browser_workflow1.png
  3. Inside the Talker_and_Listener_Test Test Bench canvas, right-click and select Paste Special ‣ As Reference.

    ../../_images/tb_canvas_workflow1.png

Add Test Bench Parameters

Finally, you need to configure the Test Bench via a few Parameters.

  1. Right-click within the Talker_and_Listener_Test Test Bench canvas and select Insert New Reference ‣ Parameter.

  2. Name the Parameter urdf_path and set its Value to URDF_PATH

  3. Right-click within the Talker_and_Listener_Test Test Bench canvas and select Insert New Reference ‣ Parameter.

  4. Name the Parameter gazebo_simulation and set its Value to False

  5. Right-click within the Talker_and_Listener_Test Test Bench canvas and select Insert New Reference ‣ Parameter.

  6. Name the Parameter generated_launch_package_name and set its Value to talker_and_listener

    ../../_images/tb_canvas_parameters1.png

Run Test Bench

Now its time to run the Talker_and_Listener_Test Test Bench.

  1. With the Talker_and_Listener_Test Test Bench canvas open, left-click on the CyPhy Master Interpreter button.

    ../../_images/cyphy_master_interpreter1.png
  2. The CyPhy Master Interpreter window will open. Ensure that Post to META Job Manager is checked and that the Talker_and_Listener_Test configuration is selected. Then Left-click OK.

    The Job will be listed under the Active Jobs tab of the Results Browser.

    While the job is running, it will be colored blue. Once it finishes successfully, it will change to green.

../../_images/results_browser_active_jobs1.png

View Generated Artifacts

  1. In the Results Browser window - under the Active Jobs tab, right-click on the completed job and select Show in Explorer.

    ../../_images/generated_artifacts1.png

    Inside the folder, you should see a generated ROS Package talker_and_listener.

    You will want to transfer this generated ROS Package over to your Linux machine for the next step in the tutorial.

    Congratulations! You have successfully generated a ROS Package containing model-based .launch file.