ROS Helper Nodes for utilising LGSVL Simulator in Autonomous Vehicles Development
- [19 Oct 2022] Major refactor of the repo, included minimal required autoware_ai components so now you can use this repo out-of-the box.
- Ground Truth Objects: Convert
lgsvl
3D ground truth objects toautoware
andjsk_recognition
messages and visualize them in Rviz - Vehicle Status Publishing: The ego vehicle's Can Bus data are extracted from the
lgsvl
simulator and published to ROS - Map Format Supports: Support
pointcloud map
,lanelet2 map
,vector map
formats - Global Planning: Provide Global Planning in
lanelet2 map
format (Issue discovered, fixing...) - Joystick Control: Drive in the Simulator with a joystick (currently support
Xbox
,Logitech F710
joysticks, and control settings likeForza Horizon
,Japan Hand
,USA Hand
) - Vehicle State Control: Control the Ego Vehicle's State with
lgsvl_msgs::VehicleStateData
message (including control of all the lights, blinkers, wipers, etc) - Vehicle Motion Control: Control the Ego Vehicle's Motion with
lgsvl_msgs::VehicleControlData
message (with Reversing Enabled) - Vehicle Model: Display the ego vehicle model in Rviz
- feat: 2D Ground Truth Objects
- feat: Support for Other Sensors
- feat: Relocalization?
- The official BorregasAve lanelet2 map file contains minor connection errors (not going to fix)
- System Requirements:
- Ubuntu 18.04/20.04
- ROS Melodic/Noetic
- C++11 above
- CMake: 3.0.2 above
- This package is self-contained, only dependens on standard ROS pkgs:
- jsk_recognition_msgs
- autoware_msgs
- lgsvl_msgs
- visualization_msgs
- geometry_msgs
- sensor_msgs
- nav_msgs
- std_msgs
- roscpp
- rospy
- tf2_ros
- tf2_eigen
- tf2_geometry_msgs
- tf
- joy
- cv_bridge
- image_transport
- rosbridge_server
To use this package, you will need to create a catkin_ws
first. Details please see the ROS official tutorial.
# clone the repo into your catkin workspace (assuming ~/catkin_ws here)
cd ~/catkin_ws/src
git clone https://github.com/SS47816/lgsvl_utils.git
cd ..
# install dependencies
rosdep install --from-paths src --ignore-src -r -y
# build
catkin_make
# source
source devel/setup.bash
Step 1: Download LGSVL Simulator and register an account from here
Step 2: Download the LGSVL maps from the official repo
# create a directory called `shared_dir` under HOME directory
cd
mkdir shared_dir
cd ~/shared_dir
# clone the autoware map data into this directory
git clone https://github.com/lgsvl/autoware-data.git
Replace all the contents in ~/shared_dir/autoware-data/BorregasAve/
with the contents in lgsvl_utils/lgsvl_utils/lgsvl_assets/BorregasAve/
Step 3: Create a new simulation on the LGSVL simulator web client.
- On the
General
page, fill in some information and select your local cluster. - On the
Test Case
page, select theBorregasAve
Map,UT Lexus
Vehicle and upload the sensor configuration provided inlgsvl_utils/lgsvl_assets/sensor_config/[Custom] Autoware AI.json
- On the
Autopilot
page, selectAutoware.AI v1.14
and use the defaultlocalhost:9090
Step 4: Start the simulation
Step 5: Launch the nodes in this lgsvl_utils
pkg using the lgsvl_utils/launch/lgsvl_borregas.launch
# launch the all the nodes on the example BorregasAve Map
roslaunch lgsvl_utils borregas.launch
Step 6: You may now use a Xbox or Logitech F710 joystick to control the ego vehicle. You may change the joystick settings in launch/common.launch
(joy_type
and control_setting
) or customize the button mapping accroding to your own preference in src/joystick_node.cpp
.
Step 7: The mode of the ego vehicle is fully controlled by the joystick, for example: A
-> Autonomous Mode, B
-> Brake Mode, X
-> Manual Mode, Y
-> Manual Reverse Mode
(Note: For safety considerations, the Autonomous Mode (A
) can only be started when the vehicle is in Brake Mode (B
).)
You are welcome contributing to the package by opening a pull-request
We are following: Google C++ Style Guide, C++ Core Guidelines, and ROS C++ Style Guide
The lgsvl_utils
is released under the MIT License
The included autoware_ai
components follow their own Apache License 2.0