custom_components_tutorial - osrf/vrx GitHub Wiki

Customizing the Component Configuration

Finally, let's specify a custom component configuration.

  • In the my_wamv directory you created, use a text editor to create a file called example_component_config.yaml, and add the following contents:
wamv_camera:
    - name: front_left_camera
      visualize: False
      x: 0.75
      y: 0.1
      z: 1.5
      R: 0.0
      P: ${radians(15)}
      Y: 0.0
      post_Y: 0.0
    - name: front_right_camera
      visualize: False
      x: 0.75
      y: -0.1
      z: 1.5
      R: 0.0
      P: ${radians(15)}
      Y: 0.0
      post_Y: 0.0
    - name: far_left_camera
      visualize: False
      x: 0.75
      y: 0.3
      z: 1.5
      R: 0.0
      P: ${radians(15)}
      Y: 0.0
      post_Y: 0.0
wamv_gps:
    - name: gps_wamv
      x: -0.85
      y: 0.0
      z: 1.3
      R: 0.0
      P: 0.0
      Y: 0.0
wamv_imu:
    - name: imu_wamv
      x: 0.3
      y: -0.2
      z: 1.3
      R: 0.0
      P: 0.0
      Y: 0.0
lidar:
    - name: lidar_wamv
      type: 16_beam
      x: 0.7
      y: 0.0
      z: 1.8
      R: 0.0
      P: ${radians(8)}
      Y: 0.0
      post_Y: 0.0
wamv_ball_shooter:
    - name: ball_shooter
      x: 0.55 
      y: -0.3 
      z: 1.3
      pitch: ${radians(-20)}
      yaw: 0.0
wamv_pinger:
    - sensor_name: receiver
      position: 1.0 0 -1.0

This file adds all the same components as the default WAM-V component configuration, but arranged differently on the vehicle (e.g. the ballshooter is now on the other side of the platform). Later, you can edit this file to customize your WAM-V further.

  • Run the generate_wamv.launch.py script to generate your WAM-V's URDF with these components.
ros2 launch vrx_gazebo generate_wamv.launch.py component_yaml:=`pwd`/example_component_config.yaml thruster_yaml:=`pwd`/example_thruster_config.yaml wamv_target:=`pwd`/wamv_target.urdf wamv_locked:=False
  • The WAM-V should now have components arranged in the locations given above. From the previous tutorial, it will also have 3 thrusters:

custom_compoent_2023

Back: Customizing the Thruster Configuration Top: VRX Tutorials
⚠️ **GitHub.com Fallback** ⚠️