All Projects → gtagency → buzzmobile

gtagency / buzzmobile

Licence: MIT license
An autonomous parade float/vehicle

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
shell
77523 projects
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to buzzmobile

Visualizing-lidar-data
Visualizing lidar data using Uber Autonomous Visualization System (AVS) and Jupyter Notebook Application
Stars: ✭ 75 (+316.67%)
Mutual labels:  autonomous-vehicles
AdverseDrive
Attacking Vision based Perception in End-to-end Autonomous Driving Models
Stars: ✭ 24 (+33.33%)
Mutual labels:  autonomous-vehicles
PyLidar3
PyLidar3 is python 3 package to get data from Lidar devices from various manufacturers.
Stars: ✭ 35 (+94.44%)
Mutual labels:  autonomous-vehicles
pyMHT
Track oriented, multi target, multi hypothesis tracker
Stars: ✭ 66 (+266.67%)
Mutual labels:  autonomous-vehicles
SelfDrivingRCCar
Autonomous RC Car using Neural Networks, Python and Open CV
Stars: ✭ 102 (+466.67%)
Mutual labels:  autonomous-vehicles
wasr network
WaSR Segmentation Network for Unmanned Surface Vehicles v0.5
Stars: ✭ 32 (+77.78%)
Mutual labels:  autonomous-vehicles
dig-into-apollo
Apollo notes (Apollo学习笔记) - Apollo learning notes for beginners.
Stars: ✭ 1,786 (+9822.22%)
Mutual labels:  autonomous-vehicles
copilot
Lane and obstacle detection for active assistance during driving. Uses windowed sweep for lane detection. Combination of object tracking and YOLO for obstacles. Determines lane change, relative velocity and time to collision
Stars: ✭ 95 (+427.78%)
Mutual labels:  autonomous-vehicles
self-driving-car
Implementation of the paper "End to End Learning for Self-Driving Cars"
Stars: ✭ 54 (+200%)
Mutual labels:  autonomous-vehicles
Voof
Visual odometry using optical flow and neural networks
Stars: ✭ 59 (+227.78%)
Mutual labels:  autonomous-vehicles
drift drl
High-speed Autonomous Drifting with Deep Reinforcement Learning
Stars: ✭ 82 (+355.56%)
Mutual labels:  autonomous-vehicles
highway-path-planning
My path-planning pipeline to navigate a car safely around a virtual highway with other traffic.
Stars: ✭ 39 (+116.67%)
Mutual labels:  autonomous-vehicles
Model-Predictive-Control
This project is to use Model Predictive Control (MPC) to drive a car in a game simulator. The server provides reference waypoints (yellow line in the demo video) via websocket, and we use MPC to compute steering and throttle commands to drive the car. The solution must be robust to 100ms latency, since it might encounter in real-world application.
Stars: ✭ 93 (+416.67%)
Mutual labels:  autonomous-vehicles
SCUTTLE
SCUTTLE™: Sensing, Connected, Utility Transport Taxi for Level Environments [An open-source Mobile Robot]
Stars: ✭ 58 (+222.22%)
Mutual labels:  autonomous-vehicles
Monocular-Vehicle-Localization
Estimating the orientation and the relative dimensions of vehicles by producing a 3d bounding frame
Stars: ✭ 28 (+55.56%)
Mutual labels:  autonomous-vehicles
community-projects
Webots projects (PROTO files, controllers, simulation worlds, etc.) contributed by the community.
Stars: ✭ 20 (+11.11%)
Mutual labels:  autonomous-vehicles
Tonic
An autonomous vehicle written in python
Stars: ✭ 85 (+372.22%)
Mutual labels:  autonomous-vehicles
AdvancedLaneLines
Lane identification system for camera based systems.
Stars: ✭ 61 (+238.89%)
Mutual labels:  autonomous-vehicles
SecondaryAwesomeCollection
收集深度学习相关的awesome 资源列表,欢迎补充
Stars: ✭ 75 (+316.67%)
Mutual labels:  autonomous-vehicles
Auto-Birds-Eye
Bird's eye/Top Down view generation and mapping with deep learning.
Stars: ✭ 129 (+616.67%)
Mutual labels:  autonomous-vehicles

bzm buzzmobile Build Status

An autonomous parade vehicle, modeled after Georgia Tech's Rambling Wreck

Architecture

A list of available nodes and an overview of the architecture is available here.

architecture

Environment

To get started, be running Ubuntu 14.04 (required for ROS Indigo) with python 2.7 installed. Then run:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/gtagency/buzzmobile.git
cd buzzmobile
./install

If you already have ROS Indigo installed, you can just clone directly into ~/catkin/src/ and run the install script. If you want to manually install ROS Indigo you can follow the tutorial here.

The install script will create a virtualenv, install system dependencies (including ROS Indigo), install python dependencies, build the package, and source all required files. It will also put the rosinit, rosdevel and rosvenv aliases in your .bashrc.

To use the google maps api, you'll need two api keys. Put one under buzzmobile/sense/maps_querier/googlemapskey.py and one under buzzmobile/tools/route_mapper/googlemapskey.py as shown below. Note that the keys need to have proper permissions set in the Google API Console, for use of the Google Maps API and the Google Maps Static API, respectively.

googlemapskey='your_secret_api_key'

To use the gps and the lidar nodes, you will need user permissions to directly access the usb ports for gps and lidar. For that, do:

sudo usermod -aG dialout <YOUR USERNAME>

You will then need to log in and out again. Simply starting a new terminal is not sufficient. The Linux kernel will not refresh groups until the user completely logs out and logs in again.

Running

Make sure you are running inside the virtualenvironment, or things will appear broken: rosvenv.

To start running, you must first run catkin_make from the ~/catkin_ws dir. If there aren't any issues with the build, you can run roscore to start the main ROS process.

Create new tabs for every node and run them as such:

rosrun buzzmobile image_const.py
rosrun buzzmobile edge_detector
rosparam set usb_cam/pixel_format yuyv
rosrun usb_cam usb_cam_node

Note that rospy nodes don't require catkin_make to run, but do require the .py extension. If you're writing a new rospy node, also make sure the file is made executable, and has #!/usr/bin/env python as its first line.

chmod +x path/to/rospy_node.py  # make sure file has shebang
rosrun buzzmobile rospy_node.py

Some nodes require parameters that are defined in the buzzmobile/constants.yaml file. To load those constants as rosparams, do:

rosparam load ~/catkin_ws/src/buzzmobile/buzzmobile/constants.yaml

If you want to visualize your nodes, you can run the ROS visualizer (rviz), image_view, or rqt_gui. These three have different ways of visualizing messages being published:

rosrun rviz rviz
rosrun image_view image_view image:=some_imgmsg
rosrun rqt_gui rqt_gui

To load the buzzmobile mission control, load rqt_gui with the mission control perspective (configuration) file:

rosrun rqt_gui rqt_gui --perspective-file=buzzmobile/tools/mission_control/Default.perspective

To run the GPS node, do:

rosrun nmea_navsat_driver nmea_serial_driver _port:=/dev/ttyUSB0 _baud:=4800

To run the Lidar node, do:

rosrun hokuyo_node hokuyo_node port:=/dev/ttyACM0

Note that /dev/ttyUSB0 and /dev/ttyACM0 are the default serial ports for GPS and Lidar respectively. These may or may not be different. Here are some useful commands for debugging if things aren't set up correctly:

ls -l /dev/ttyACM0  # List permissions. Will output failure if /dev/ttyACM0 is not set.
sudo chmod a+rw /dev/ttyACM0  # Sets read/write permissions for all users, not recommended.

If you need to mock a polyline, this tool will be useful: google polyline util

Recording

If you want to record the messages being outputted by certain nodes, you can use rosbag:

mkdir ~/bagfiles
cd ~/bagfiles
rosbag record -O filename /message/name

To see info about the recorded data, do rosbag info filename.bag

To play the data (and publish those messages), do rosbag play test.bag. To play in a loop, just add the -l flag.

Developing

If you ever need to add ros dependencies, add them to buzzmobile/packages.xml and install them with:

cd ~/catkin_ws/src
rosdep install -y --from-paths ./buzzmobile/buzzmobile --ignore-src --rosdistro=indigo

If you need to add python deps, make sure you're in the virtual environment (rosvenv), then add the dep to buzzmobile/setup.py and do:

cd ~/catkin_ws/src/buzzmobile
pip install -e buzzmobile

Alternatively, you can update both ros and python deps using:

./ci_scripts/update_deps

Starting Car

To start car and prepare it for driving, perform the following steps:

  1. Connect the battery
  2. Flip the switch inside to turn the car on
  3. Ensure all e-stops are disabled. (Red buttons on front and back in out position and enabled via remote)
  4. Press the green button to start the motors (Car is now live)

The car starts in START mode where it receives no information. It must be switched to MANUAL or AUTO for it to drive. See 'Manual Mode Controls' for details on switching modes and operating the car.

Manual Mode Controls

The controller_node node outputs a CarPose message and a CarState message determined by input from a PS4 controller. To control these messages and operate the car manually using the controller, use the following controls:

  • Left Joystick: Change steering angle
  • R2 (Right Trigger): Change velocity
  • Square: Enable reverse. When this is held down, velocity is negated meaning the car will accelerate backwards.
  • X: Honk the horn
  • Home Button: Switch the car between AUTO and MANUAL modes.

The car starts in START mode. When pressed it will switch to MANUAL mode. Every subsequent press toggles between AUTO and MANUAL mode.

Testing

Testing is done with pytest. To run tests, you can run the script in ci_scripts/unittest, which will run all unit tests. If you want to run a specific test, make sure that the environment is initialized (run rosvenv, rosinit, and rosdevel) then run:

cd ~/catkin_ws/src/buzzmobile/buzzmobile
pytest tests/unit/path/to/test.py

Be careful! Make sure not to run any tests from outside the inner buzzmobile/ dir, as that creates a name conflict in tests that try importing buzzmobile.std_msgs.

Also make sure not to run tests from the root directory of the project, as there is a virtualenv there: running pytest will attempt to run thousands of unittests included with the python interpreter.

To write additional unit tests, please place within buzzmobile/tests/unit in directories that match the source files, that is, tests for the buzzmobile/process/gps_mapper node should go in buzzmobile/tests/unit/process/test_gps_mapper.py. Integration and simulation tests should go in the buzzmobile/tests/integration and buzzmobile/tests/simulation test subdirectories respectively.

In order to use the test_util api for writing tests, please refeer to the readme in buzzmobile/buzzmobile/tests/test_utils/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].