Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/lgsvl sim #1790

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[submodule "ros/src/sensing/drivers/lidar/packages/robosense"]
path = ros/src/sensing/drivers/lidar/packages/robosense
url = https://github.com/CPFL/robosense
[submodule "ros/src/msgs/lgsvl_msgs"]
path = ros/src/msgs/lgsvl_msgs
url = https://github.com/lgsvl/lgsvl_msgs.git
[submodule "ros/src/sensing/drivers/lidar/packages/ouster"]
path = ros/src/sensing/drivers/lidar/packages/ouster
url = https://github.com/CPFL/ouster
Expand Down
1 change: 1 addition & 0 deletions ros/src/msgs/lgsvl_msgs
Submodule lgsvl_msgs added at da9787
1 change: 1 addition & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/*
62 changes: 62 additions & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 2.8.3)
project(lgsvl_simulator_bridge)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
autoware_msgs
geometry_msgs
rosbridge_server
roscpp
rospy
roslib
sensor_msgs
)

###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES lgsvl_simulator_bridge
CATKIN_DEPENDS autoware_msgs geometry_msgs rosbridge_server roscpp rospy sensor_msgs
# DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
${catkin_INCLUDE_DIRS}
)

#############
## Install ##
#############
foreach(programs)
install(TARGETS ${programs}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
endforeach(nodes)

install(DIRECTORY include
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

foreach(dir launch rviz)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
endforeach(dir)

install(PROGRAMS scripts/launch_sim.bash DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
31 changes: 31 additions & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# lgsvl_simulator_bridge package

This package provides lgvsl simulator and Autoware.
[![No Image](https://img.youtube.com/vi/NgW1P75wiuA/0.jpg)](http://www.youtube.com/watch?v=NgW1P75wiuA)

## Quick Start
### initial setup (just first time)
```
roscd lgsvl_simulator_bridge
source quick_setup_sim.bash
```

### launch simulator and bridge
```
roslaunch lgsvl_simulator_bridge lgsvl_simulator.launch
```

Please choose "SanFrancisco" map and "XE_Rigged-autoware" robot for Autoware.
[Reference](https://github.com/lgsvl/simulator/issues/5)

```
roslaunch lgsvl_simulator_bridge autoware_sample.launch
```

![lgsvl_simulator_bridge](media/lgsvl_simulator_bridge.png)

## launch with simulator you have built
1. set $LGSVL_SIM_DIR_PATH
```
export LGSVL_SIM_DIR_PATH=<lgsvl_sim_binary_directory_path>
```
2 changes: 2 additions & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<launch>
<node pkg="gnss_localizer" type="nmea2tfpose" name="nmea2tfpose"/>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find lgsvl_simulator_bridge)/rviz/lgsvl_simulator.rviz" respawn="false" />

<node pkg="tf" type="static_transform_publisher" name="base_link_to_velodyne" args="1.0 0 2.0 0 0 0 base_link velodyne 10"/>

<node pkg="tf" type="static_transform_publisher" name="gps_to_base_link" args="0.0 0 0.0 0 0 0 gps base_link 10"/>

<include file="$(find model_publisher)/launch/estima_white.launch">
<arg name="offset_yaw" default="90"/>
</include>
</launch>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<launch>
<node pkg="lgsvl_simulator_bridge" type="launch_sim.bash" name="lgsvl_simulator_launcher">
</node>

<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch"/>
</launch>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<package format="2">
<name>lgsvl_simulator_bridge</name>
<version>0.0.0</version>
<description>The lgsvl_simulator_bridge package</description>

<maintainer email="masaya.kataoka@tier4.jp">Masaya Kataoka</maintainer>

<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>autoware_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>rosbridge_server</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>roslib</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_export_depend>autoware_msgs</build_export_depend>
<build_export_depend>geometry_msgs</build_export_depend>
<build_export_depend>rosbridge_server</build_export_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>roslib</build_export_depend>
<build_export_depend>sensor_msgs</build_export_depend>
<exec_depend>autoware_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>rosbridge_server</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>roslib</exec_depend>
<exec_depend>sensor_msgs</exec_depend>


<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
wget https://github.com/lgsvl/simulator/releases/download/2018.12-rc1/lgsvlsimulator-linux64-2018.12-rc1.zip -P bin
cd bin
unzip lgsvlsimulator-linux64-2018.12-rc1.zip
cd lgsvlsimulator-linux64-2018.12-rc1
export LGSVL_SIM_DIR_PATH=$PWD
echo "export LGSVL_SIM_DIR_PATH=$PWD" >> ~/.bashrc
198 changes: 198 additions & 0 deletions ros/src/simulation/lgsvl_simulator_bridge/rviz/lgsvl_simulator.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
Splitter Ratio: 0.5
Tree Height: 396
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.588679016
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: PointCloud2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.0299999993
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Class: rviz/RobotModel
Collision Enabled: false
Enabled: true
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
Name: RobotModel
Robot Description: robot_description
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: -0.143798828
Min Value: -2.16226292
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 253
Min Color: 0; 0; 0
Min Intensity: 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.0500000007
Style: Flat Squares
Topic: /points_raw
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Class: rviz/Image
Enabled: true
Image Topic: /simulator/camera_node/image
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Queue Size: 2
Transport Hint: compressed
Unreliable: false
Value: true
- Class: rviz/TF
Enabled: true
Frame Timeout: 15
Frames:
All Enabled: true
base_link:
Value: true
velodyne:
Value: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
base_link:
velodyne:
{}
Update Interval: 0
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: base_link
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 14.1009302
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.0500000007
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
Pitch: 0.520397961
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 2.63539982
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1056
Hide Left Dock: false
Hide Right Dock: false
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd00000004000000000000016a00000396fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006100fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000280000021b000000d700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d0061006700650100000249000001750000001600ffffff000000010000010f00000396fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000002800000396000000ad00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000073f0000003efc0100000002fb0000000800540069006d006501000000000000073f0000030000fffffffb0000000800540069006d00650100000000000004500000000000000000000004ba0000039600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1855
X: 1985
Y: 24
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd $LGSVL_SIM_DIR_PATH
./simulator
Loading