This includes 5 ros packages: four for the VESC (vesc_driver
, which communicates with the VESC, vesc_ackerman
, which converts between VESC and ackermann ROS messages, vesc_msgs
, which contains definitions for the VESC messages, and ackermann_cmd_mux
, which is an input multiplexer for ackermann commands), and one called avc
. The avc
package contains all the launch and configuration files we are using, and it is the focus of this documentation.
Here is a diagram of the system setup.
- Directory Tree
- Launch Files
2.1 Launch File Locations
2.2 How to use the Launch Files
2.3 The Master Launch File
2.4 Recording Bag Files - Configuration Files
3.1 Config File Locations
3.2 Config File Descriptions
avc <-- The package root directory
├── CMakeLists.txt
├── config <-- The configuration files (used by launch files)
│ ├── amcl.yaml
│ ├── ekf_global.yaml
│ ├── ekf_local.yaml
│ ├── gps.yaml
│ ├── imu.yaml
│ ├── joy_teleop.yaml
│ ├── laser.yaml
│ ├── mux.yaml
│ └── vesc.yaml
├── launch <-- The launch files
│ ├── amcl.launch
│ ├── includes <-- Modular XML files used by the launch files
│ │ ├── amcl
│ │ │ ├── amcl.launch.xml
│ │ │ └── map.launch.xml
│ │ ├── inputs
│ │ │ └── joy_teleop.launch.xml
│ │ ├── localization
│ │ │ ├── ekf_global_localization.launch.xml
│ │ │ ├── ekf_local_localization.launch.xml
│ │ │ └── navsat_transform.launch.xml
│ │ ├── sensors
│ │ │ ├── sensors.launch.xml
│ │ │ └── static_transforms.launch.xml
│ │ └── vesc
│ │ └── vesc.launch.xml
│ ├── localization.launch
│ ├── master.launch
│ ├── sensors.launch
│ └── teleop.launch
├── map <-- The map and its configuration
│ ├── map.pgm
│ └── map.yaml
└── package.xml
The launch files are the user front-end for making things happen on the car. They are written in xml syntax. You'll notice that there is an includes
folder inside the launch file directory. Inside there are several *.xml files (e.g. 'sensors.launch.xml'). Each one performs a very specific function, such as launching the sensor nodes, launching the localization nodes, or publishing static transforms. These are included and used by the higher-level launch files (the ones in the launch
directory). That way, when creating a new launch file, you can include the files that do the things you want instead of re-writting all the code each time.
Launch files are located in the ieee_avc/src/avc/launch/
directory. (Use roscd avc/launch
to get there)
roslaunch avc sensors.launch
launches only the sensors (GPS, IMU, and Lidar) with their static_transformsroslaunch avc teleop.launch
launches teleop (joystick controller and vesc to drive the car around)roslaunch avc localization.launch
launches global and local localization nodesroslaunch avc amcl.launch
launches amcl and map_server nodes
Several of these launch files can be run simultaneously (for example, if you want to run teleop with sensors, you could run both of the launch files).
There is one more launch file called master.launch
. This launch file is configurable via command line to run whatever you want. For example, running
roslaunch avc master.launch teleop:=true vesc:=true sensors:=true local_localization:=true
will start the teleop, launch the sensor nodes, and start just the local localization node.
Here is a list of possible command line arguments:
teleop:=true
starts the joystick nodes that provide teleop commands (does not start the vesc driver, only the joystick)vesc:=true
starts the vesc driver node and ackermann command multiplexer (for example, use with theteleop
option to be able to drive the car around with the controller.sensors:=true
starts the IMU, GPS, and Lidar nodeslocalization:=true
starts local and global localization nodes (undefined behavior if used with the individual local or global localization arguments)local_localization:=true
starts only the local localization node (undefined behavior if used with any other localization arguments)global_localization:=true
starts only the global localization node (undefined behavior if used with any other localization arguments)amcl:=true
starts the amcl nodemap_server:=true
starts the map_server node
All launch files can be used to create bag files. Simply add the bag:=true
argument when you launch it. (NOTE: this only needs to be done once, so if you start multiple launch files then only use the argument once). Once the launched nodes are killed, the .bag file can be found in the ~/.ros
directory.
Configuration files are all *.yaml files, and contain the parameters that are used by the launchfiles.
Launch files are located in the ieee_avc/src/avc/config/
directory. (Use roscd avc/config
to get there). The only exception to this is the map.yaml
file, which is located in the map
directory of the avc
package.
laser.yaml
configuration for the Lidar (link)gps.yaml
configuration parameters for the GPS (link)imu.yaml
configuration parameters for the IMU (link)vesc.yaml
configuration for the VESCamcl.yaml
filter parameters for the AMCL algorithm (link)ekf_global.yaml
configuration parameters for the global localization algorithm (link)efk_local.yaml
configuration parameters for the local localization algorithm (link)joy_teleop.yaml
configuration for the node that transforms the joystick messages into ackermann messages (link)mux.yaml
configuration for the ackermann command multiplexermap.yaml
map parameters (automatically generated with the map) (link)