Skip to content

usdot-fhwa-stol/cda1tenth-bringup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cda1tenth_bringup

This package contains the launch and configuration files needed to bring up a physical or simulated CDA1Tenth vehicle. Some functionality may depend on the companion packages from navigation2_extensions which provides route server and CDA additions to the CDA1Tenth system.

Prerequisites

The following configuration steps must be completed before a CDA1Tenth vehicle or simulation will be ready for bringup.

  1. Download the nav2_route_server branch and build it from source, which can be found here.

  2. Install the following udev rules to the /etc/udev/rules.d/ directory if using a physical vehicle:

    • 99-joypad-f710.rules
    • 99-vesc6.rules
    • rplidar.rules

    [NOTE] See 1. udev Rules Setup in the F1Tenth build documentation for details.

  3. Source the Nav2 install for future terminal instances with echo 'source /home/$USER/cda_ws/install/setup.bash' >> ~/.bashrc

  4. A map and route graph will need to be created for physical test environments. The turtlebot configuration includes these for reference. Maps can be created using slam_toolbox and graphs should follow the examples given in this package. New maps and graphs will need to manually updated in the launch and parameter files.

Launch

Run the following command to launch the CDA1Tenth system:

$ ros2 launch cda1tenth_bringup cda1tenth_bringup_launch.xml vehicle:=[red_truck, blue_truck, turtlebot] record_bag:=[true, false]

This will launch all necessary subsystems, such as drivers, localization, and navigation.

Launch Arguments

  • vehicle controls the parameter file used to launch the system and requires an input

    • red_truck and blue_truck target parameter files specific to their respective CDA1Tenth vehicles

    • turtlebot runs a Gazebo-based simulation that allows for running core cda1tenth_bringup packages locally without hardware interface nodes

  • record_bag is a boolean argument for recording all data from the system in a ROS2 rosbag and defaults to false. Bags are saved in ~/cda_bags along with a copy of the parameter file used

Post launch

After launching the nodes included in cda1tenth_bringup, additional actions are needed to finalize the system on a physical vehicle.

  1. If using a physical vehicle, RViz will need to be launched on an external PC on the same network and ROS_DOMAIN_ID as the vehicle. A specific RViz configuration is needed for visualizing and interacting with Nav2, which can be found in this package under the rviz directory. Run RViz in a terminal using the command rviz2 and open this file using File > Open Config.

  2. In RViz, set the vehicle's initial pose estimate by selecting the 2D Pose Estimate button at the top and drawing the approximate pose of the vehicle with respect to the map. The ROS2 nodes being used by the vehicle should be visualized after the estimate is drawn.

  3. A navigation command can now be sent to the CDA1Tenth vehicle by using the 2D Goal Pose button to draw a goal pose on the map using the RViz GUI.

Shutdown

To shut down the system, use CTRL + C on the cda1tenth_bringup and rviz2 terminals. Run ros2 node list to verify all nodes are shut down before relaunching the system.

Contribution

Welcome to the CARMA contributing guide. Please read this guide to learn about our development process, how to propose pull requests and improvements, and how to build and test your changes to this project. CARMA Contributing Guide

Code of Conduct

Please read our CARMA Code of Conduct which outlines our expectations for participants within the CARMA community, as well as steps to reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community.

Attribution

The development team would like to acknowledge the people who have made direct contributions to the design and code in this repository. CARMA Attribution

License

By contributing to the Federal Highway Administration (FHWA) Connected Automated Research Mobility Applications (CARMA), you agree that your contributions will be licensed under its Apache License 2.0 license. CARMA License

Contact

Please click on the CARMA logo below to visit the Federal Highway Adminstration(FHWA) CARMA website.

CARMA Image