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 HEBI_Daisy_Hexapod_Tutorial_Test.

Create and Run Test Bench

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

  1. Locate the GME Browser window.
  2. Right-click on the HEBI_Daisy_Hexapod_Tutorial_Test Testing folder and select Insert Model ‣ Test Bench.
  3. Name this new Test Bench HEBI_Daisy_Hexapod_Test.
  4. Double left-click the new HEBI_Daisy_Hexapod_Test Test Bench to open its canvas.

Add HEBI_Daisy_Hexapod Component Assembly

  1. Locate the GME Browser window.

  2. Right-click on the RootFolder > HEBI_Daisy_Hexapod_Tutorial_Test > HEBI_Daisy_Hexapod_Asm Component Assembly and select Copy.

  3. Inside the HEBI_Daisy_Hexapod_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_asm.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 GenerateURDFAndLaunch Workflow which is already included in the Testing directory.

  1. Locate the GME Browser window.

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

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

    ../../_images/tb_canvas_workflow.png

Add Test Bench Parameters

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

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

  2. Name the Parameter gazebo_simulation and set its Value to True

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

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

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

  6. Name the Parameter spawn_position and set its Value to (0,0,0.25).

    ../../_images/tb_canvas_parameters.png

Add CADComputationComponent and Parameters

  1. Locate the Part Browser window. If it is not visible, make sure the View ‣ Part Browser option is ticked.

  2. Within the Part Browser window, select the All filter and scroll down until you locate the CADComputationComponent.

    ../../_images/tb_canvas_cad_computation_1.png
  3. Left-click on the CADComputationComponent icon and drag it onto the HEBI_Daisy_Hexapod_Test Test Bench canvas.

  4. Within the HEBI_Daisy_Hexapod_Test canvas, double left-click on the CADComputationComponent model to edit it.

  5. Locate the Part Browser window. If it is not visible, make sure the View ‣ Part Browser option is ticked.

  6. From the Part Browser window, drag the BoundingBox, CenterOfGravity, InterferenceCount, and Mass models onto the CADComputationComponent canvas.

    ../../_images/cad_computation_canvas.png
  7. Return to the HEBI_Daisy_Hexapod_Test Test Bench canvas.

  8. Right-click within the HEBI_Daisy_Hexapod_Test Test Bench canvas and select Insert New Reference ‣ Metric.

  9. Name the Metric BoundingBox, and connect the CADComputationComponent model’s BoundingBox port to it.

  10. Right-click within the HEBI_Daisy_Hexapod_Test Test Bench canvas and select Insert New Reference ‣ Metric.

  11. Name the Metric CenterOfGravity, and connect the CADComputationComponent model’s CenterOfGravity port to it.

  12. Right-click within the HEBI_Daisy_Hexapod_Test Test Bench canvas and select Insert New Reference ‣ Metric.

  13. Name the Metric InterferenceCount, and connect the CADComputationComponent model’s InterferenceCount port to it.

  14. Right-click within the HEBI_Daisy_Hexapod_Test Test Bench canvas and select Insert New Reference ‣ Metric.

  15. Name the Metric Mass, and connect the CADComputationComponent model’s Mass port to it.

    ../../_images/tb_canvas_cad_computation_2.png
  16. Right-click within the HEBI_Daisy_Hexapod_Test Test Bench canvas and select Insert New Reference ‣ Parameter.

  17. Name the Parameter Export_All_Component_Points.

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

  19. Name the Parameter EXPORT_STEREOLITHOGRAPHY_BINARY.

    ../../_images/tb_canvas_cad_computation_3.png

Run Test Bench

Now its time to run the HEBI_Daisy_Hexapod_Test Test Bench.

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

    ../../_images/cyphy_master_interpreter.png
  2. The CyPhy Master Interpreter window will open. Ensure that Post to META Job Manager is checked and then the HEBI_Daisy_Hexapod 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_jobs.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_artifacts.png

    Inside the folder, you should see 2 generated ROS Packages hebi_daisy_hexapod_test_generated_launch_… and hebi_daisy_hexapod_test_generated_urdf_….

    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 and .urdf files.