Skip to content

Commit

Permalink
Merge pull request #29 from OneNightROBOCON/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dashimaki360 authored Feb 18, 2020
2 parents 6750809 + 5668c8c commit cfaba73
Show file tree
Hide file tree
Showing 9 changed files with 680 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ cd ~/catkin_ws/src
git clone https://github.com/OneNightROBOCON/burger_war
```

このリポジトリのフィールド用のGAZEBOモデルにPATHを通す
このリポジトリのフィールド用のGAZEBOモデルにPATHを通す。

Turtlebot3のモデル名の指定を環境変数に追加。
```
export GAZEBO_MODEL_PATH=$HOME/catkin_ws/src/burger_war/burger_war/models/
echo "export GAZEBO_MODEL_PATH=$HOME/catkin_ws/src/burger_war/burger_war/models/" >> ~/.bashrc
echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc
source ~/.bashrc
```
シェルごとに毎回実行するのは面倒なので上記は`~/.bashrc`に書いておくと便利です。


### 3. 依存ライブラリのインストール
- pip : pythonのパッケージ管理ツール
Expand Down
2 changes: 1 addition & 1 deletion burger_navigation/rviz/burger_navigation.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Visualization Manager:
Draw Behind: false
Enabled: true
Name: Costmap
Topic: /red_bot/move_base/local_costmap/costmap
Topic: /move_base/local_costmap/costmap
Unreliable: false
Use Timestamp: false
Value: true
Expand Down
235 changes: 235 additions & 0 deletions burger_navigation/rviz/sim_level_2_teriyaki_burger_navigation.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /RobotModel1/Status1
- /TF1
- /TF1/Status1
- /TF1/Frames1
- /TF1/Tree1
- /LaserScan1
- /LaserScan1/Status1
- /Map1
- /Amcl Particles1
Splitter Ratio: 0.5
Tree Height: 843
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
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: LaserScan
Toolbars:
toolButtonStyle: 2
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: 20
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Class: rviz/RobotModel
Collision Enabled: false
Enabled: false
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
Name: RobotModel
Robot Description: robot_description
TF Prefix: ""
Update Interval: 0
Value: false
Visual Enabled: true
- Class: rviz/TF
Enabled: true
Frame Timeout: 15
Frames:
All Enabled: false
base_footprint:
Value: true
enemy_bot/base_footprint:
Value: true
enemy_bot/base_link:
Value: true
enemy_bot/base_scan:
Value: true
enemy_bot/caster_back_link:
Value: true
enemy_bot/imu_link:
Value: true
enemy_bot/map:
Value: true
enemy_bot/odom:
Value: true
enemy_bot/wheel_left_link:
Value: true
enemy_bot/wheel_right_link:
Value: true
odom:
Value: true
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: false
Tree:
enemy_bot/map:
enemy_bot/odom:
enemy_bot/base_footprint:
enemy_bot/base_link:
enemy_bot/base_scan:
{}
enemy_bot/caster_back_link:
{}
enemy_bot/imu_link:
{}
enemy_bot/wheel_left_link:
{}
enemy_bot/wheel_right_link:
{}
Update Interval: 0
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 0; 255; 0
Color Transformer: FlatColor
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 13069
Min Color: 0; 0; 0
Min Intensity: 28
Name: LaserScan
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.0300000012
Style: Flat Squares
Topic: /enemy_bot/scan
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 0.5
Class: rviz/Map
Color Scheme: map
Draw Behind: false
Enabled: true
Name: Map
Topic: /enemy_bot/map
Unreliable: false
Use Timestamp: false
Value: true
- Alpha: 1
Arrow Length: 0.0500000007
Axes Length: 0.300000012
Axes Radius: 0.00999999978
Class: rviz/PoseArray
Color: 0; 192; 0
Enabled: true
Head Length: 0.0700000003
Head Radius: 0.0299999993
Name: Amcl Particles
Shaft Length: 0.230000004
Shaft Radius: 0.00999999978
Shape: Arrow (Flat)
Topic: /enemy_bot/particlecloud
Unreliable: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: enemy_bot/map
Frame Rate: 30
Name: root
Tools:
- Class: rviz/MoveCamera
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/Select
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/Measure
Value: true
Views:
Current:
Angle: -9.5958004
Class: rviz/TopDownOrtho
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
Scale: 136.429901
Target Frame: <Fixed Frame>
Value: TopDownOrtho (rviz)
X: 0
Y: 0
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1056
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd0000000400000000000001e9000003dafc0200000007fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000028000003da000000dd00fffffffb0000000a0049006d0061006700650000000319000000cc0000000000000000fb0000000a0049006d0061006700650000000330000000ce0000000000000000000000010000010f000003dafc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730000000028000003da000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004a00000003efc0100000002fb0000000800540069006d00650000000000000004a00000030000fffffffb0000000800540069006d0065010000000000000450000000000000000000000550000003da00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1855
X: 1985
Y: 24
11 changes: 11 additions & 0 deletions burger_war/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
control_msgs
std_msgs
sensor_msgs
cv_bridge
tf
)

## System dependencies are found with CMake's conventions
Expand Down Expand Up @@ -135,6 +141,7 @@ include_directories(
## The recommended prefix ensures that target names across packages don't collide
# add_executable(${PROJECT_NAME}_node src/burger_war_node.cpp)


## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
Expand Down Expand Up @@ -197,3 +204,7 @@ include_directories(

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)


add_executable(randomRun src/randomRun.cpp)
target_link_libraries(randomRun ${catkin_LIBRARIES})
15 changes: 15 additions & 0 deletions burger_war/launch/sim_level_1_cheese.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<launch>

<!-- Your robot control node run red side-->
<include file="$(find burger_war)/launch/your_burger.launch">
<arg name="side" value="r" />
</include>

<!-- enemy bot run blue side-->
<group ns="enemy_bot">
<node pkg="burger_war" type="level_1_cheese.py" name="cheeseRun" output="screen"/>
</group>

</launch>

86 changes: 86 additions & 0 deletions burger_war/launch/sim_level_2_teriyaki.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0"?>
<launch>

<!-- Your robot control node run red side-->

<include file="$(find burger_war)/launch/your_burger.launch">
<arg name="side" value="r" />
</include>

<!-- enemy bot run blue side-->
<group ns="enemy_bot">
<!-- Arguments -->
<arg name="map_file" default="$(find burger_navigation)/maps/map.yaml"/>
<arg name="open_rviz" default="false"/>
<arg name="odom_topic" default="odom" />
<arg name="scan_topic" default="scan"/>
<arg name="initial_pose_x" default="-1.3"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<arg name="name_space" default="enemy_bot"/>

<!-- Turtlebot3 -->
<include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
<arg name="model" value="burger" />
<arg name="multi_robot_name" value="$(arg name_space)" />
</include>


<!-- Map server -->
<node pkg="map_server" name="map_server" type="map_server" args="$(arg map_file)">
<param name="frame_id" value="$(arg name_space)/map"/>
</node>

<!-- AMCL -->
<node pkg="amcl" type="amcl" name="amcl">
<param name="use_map_topic" value="true"/>
<param name="min_particles" value="300"/>
<param name="max_particles" value="2000"/>
<param name="kld_err" value="0.02"/>
<param name="update_min_d" value="0.1"/>
<param name="update_min_a" value="0.1"/>
<param name="resample_interval" value="1"/>
<param name="transform_tolerance" value="0.5"/>
<param name="recovery_alpha_slow" value="0.00"/>
<param name="recovery_alpha_fast" value="0.00"/>
<param name="initial_pose_x" value="$(arg initial_pose_x)"/>
<param name="initial_pose_y" value="$(arg initial_pose_y)"/>
<param name="initial_pose_a" value="$(arg initial_pose_a)"/>
<param name="gui_publish_rate" value="50.0"/>

<remap from="scan" to="$(arg scan_topic)"/>
<param name="laser_max_range" value="3.5"/>
<param name="laser_max_beams" value="180"/>
<param name="laser_z_hit" value="0.5"/>
<param name="laser_z_short" value="0.05"/>
<param name="laser_z_max" value="0.05"/>
<param name="laser_z_rand" value="0.5"/>
<param name="laser_sigma_hit" value="0.2"/>
<param name="laser_lambda_short" value="0.1"/>
<param name="laser_likelihood_max_dist" value="2.0"/>
<param name="laser_model_type" value="likelihood_field"/>

<param name="odom_model_type" value="diff"/>
<param name="odom_alpha1" value="0.3"/>
<param name="odom_alpha2" value="0.6"/>
<param name="odom_alpha3" value="0.3"/>
<param name="odom_alpha4" value="0.6"/>
<param name="odom_frame_id" value="$(arg name_space)/odom"/>
<param name="base_frame_id" value="$(arg name_space)/base_footprint"/>
<param name="global_frame_id" value="$(arg name_space)/map"/>
</node>

<!-- rviz -->
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true" args="-d $(find burger_navigation)/rviz/sim_level_2_teriyaki_burger_navigation.rviz">
</node>
</group>

<!-- teriyaki -->
<node pkg="burger_war" type="level_2_teriyaki.py" name="teriyakiRun" output="screen"/>


</group>

</launch>

Loading

0 comments on commit cfaba73

Please sign in to comment.