IndyAV Gazebo Simulation

How to Use

Launch Gazebo for IndyAV

roslaunch indyav_launch gazebo.launch

Launch RVIZ for IndyAV

in a new panel indyviz (this represents what the robot knows)

NOTE: this will not if run in the docker container

Launch the gazebo client (visualizer and gui)

in a new panel gazebogui (this represents ground truth)

NOTE: this will not if run in the docker container

NOTE: to kill the gazebo client after you are done, usually Ctrl + \ isrequired

NOTE: gazebogui is a custom alias we have setup to launch gazebo client with some parameters

Command a Steering angle

in a new panel:

rostopic pub /steering indyav_control/SteeringStamped -r 10 '{header: {
seq: 0,
stamp: {
  secs: 0,
  nsecs: 0},
frame_id: ''},
steering_angle: 0.5}'

Command throttle

in a new panel:

rostopic pub /throttle indyav_control/RevsStamped -r 10 '{header: {
seq: 0,
stamp: {
  secs: 0,
  nsecs: 0},
frame_id: ''},
radians_per_second: 30.000}'

and see the car drive in circles in both Rviz and gazebo client

But How Does Any of This Work

digraph indyav_gazebo
{
    ratio="compress";
    graph[fontsize=25, dpi=400];
    "BackWheelPlugin"->"indyav_car.urdf.xacro":w [label="  included by  "];
    "wheels.xacro"->"indyav_car.urdf.xacro":nw [label="  included by  "];
    "utils.xacro"->"indyav_car.urdf.xacro":n [label="  included by  "];
    "go_kart.xacro"->"indyav_car.urdf.xacro":ne [label="  included by  "];
    "sylphase.xacro"->"indyav_car.urdf.xacro":e [label="  included by  "];
    "indyav_car.urdf.xacro"->"indyav_car.urdf" [label="  interpreted into  "];

    "actuators.yaml"->"Controller manager" [label="  informs  "]
    "indyav_car.urdf"->"Controller manager" [label="  informs  "]

    "Robot Spawner";

    "indyav_car.urdf" -> "Robot Spawner";




    subgraph cluster_gazebo
    {
        compound=true;
        style=outlined;
        color=blue;
        node [style=filled,color=white];
        label = "Gazebo";
        labeljust="l";
        subgraph cluster_indyav_car
        {
            style=outlined;
            color=blue;
            node [style=filled,color=white];
            label = "indyav_car"
            labeljust="l";

            back_wheel [label="BackWheelPlugin\n(Applies Thrust)"];
            invis [style=invis, pos="0,0"];
            sylphase_ins [label="sylphase_ins Plugin \n(give the gound truth odom)"];

            right_wheel [label="right front wheel controller\n(controls the steering angle of the right \nfront wheel)"];
            left_wheel[label="left front wheel controller\n(controls the steering angle of the left \nfront wheel)"];
        }
    }

    "Robot Spawner"->invis[label="spawns"];

    "Controller manager"->right_wheel
        [label="  manages  "];
    "Controller manager"->left_wheel
        [label="  manages  "];

    sylphase_ins->"/ins_odom"[label="Publishes"];
    "/ins_odom"->"dumb_truth_tf"
        [label="Subscribes"];

    "dumb_truth_tf"->"Transform: enu <=> base_link"[label="Broadcasts"];

    right_command [label="/car/simulated_hardware_controllers\n/steering/right/command", pos="-1,-1"];
    right_command -> right_wheel [label="Subscribes"];
    "simulated steering driver"-> right_command [label="Publishes"];


    left_command [label="/car/simulated_hardware_controllers\n/steering/left/command"];
    left_command -> left_wheel [label="Subscribes"];
    "simulated steering driver"-> left_command [label="Publishes"];

    "/steering"->"simulated steering driver"[label="Subscribes"];

    "/throttle"->back_wheel[label="Subscribes"];
}