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

【ikemuuu memo】地図の作り方 #67

Open
ikemuuu opened this issue Jan 16, 2022 · 5 comments
Open

【ikemuuu memo】地図の作り方 #67

ikemuuu opened this issue Jan 16, 2022 · 5 comments

Comments

@ikemuuu
Copy link
Collaborator

ikemuuu commented Jan 16, 2022

誰でも簡単に地図が作れるようにめも

@ikemuuu
Copy link
Collaborator Author

ikemuuu commented Jan 16, 2022

your_burger.launch を以下のように変更

<?xml version="1.0"?>
<launch>
  <arg name="side" default="r"/> <!-- "b" = blue side, "r" = red side  -->

    <!-- You can change control program  -->

    <!-- sample program node -->

    <!-- <node pkg="burger_war_dev" type="randomRun.py" name="randomRun" output="screen"/> -->
 
 <!--
    <node pkg="burger_war_dev" type="pupeRun.py" name="pupeRun" output="screen"/>
    <node pkg="burger_war_dev" type="WarStateWatcher.py" name="warStateWatcher" output="screen"/>   
    <node pkg="burger_war_dev" type="ImageProcessor.py" name="imageProcessor" output="screen"/>
    <node pkg="burger_war_dev" type="ScanEnemyDetector.py" name="scanEnemyDetector" output="screen"/>
 -->

    <!-- <include file="$(find obstacle_detector)/launch/nodes.launch" /> -->


    <!-- END sample program node -->

    <!-- Navigation sample program  -->
    <include file="$(find burger_navigation)/launch/burger_navigation.launch" />
    
    <include file="$(find burger_navigation)/launch/burger_slam.launch" />
   
    <!-- END Navigation sample program node -->

    <!-- End of your space  -->
</launch>
<node pkg="burger_war_dev" type="pupeRun.py" name="pupeRun" output="screen"/>
<node pkg="burger_war_dev" type="WarStateWatcher.py" name="warStateWatcher" output="screen"/>   
<node pkg="burger_war_dev" type="ImageProcessor.py" name="imageProcessor" output="screen"/>
<node pkg="burger_war_dev" type="ScanEnemyDetector.py" name="scanEnemyDetector" output="screen"/>

をコメントアウト

<include file="$(find burger_navigation)/launch/burger_slam.launch" />
を復帰

@ikemuuu
Copy link
Collaborator Author

ikemuuu commented Jan 16, 2022

  • 敵をフィールド外に
    setup_sim.launch を以下に変更
    spawn するy 座標変えてるだけ
<!-- spawn the robot -->
<param name="robot_description" command="$(find xacro)/xacro --inorder $(find burger_war)/models/blue_bot.urdf.xacro" />
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-urdf -x 0.0 -y 5.0 -z 0.0 -Y -1.57 -model blue_bot -param robot_description">
</node>
  • 動かないように
    level1_cheese.pyを以下に変更
    すべての速度を常にゼロに
twist.linear.x = 0; twist.linear.y = 0; twist.linear.z = 0
twist.angular.x = 0; twist.angular.y = 0; twist.angular.z = 0

@ikemuuu
Copy link
Collaborator Author

ikemuuu commented Jan 16, 2022

いつもどおりシミュレータ実行

敵は cheese にする

@ikemuuu
Copy link
Collaborator Author

ikemuuu commented Jan 16, 2022

キーボード操作でロボットを動かすためのウィンドウが出てくる.

フィールドの地図を作れるように,動かしていく.
急ストップ,急旋回はNG.
止めるときも,一気に速度0ではなくて,徐々に落としていくほうがベター.

@ikemuuu
Copy link
Collaborator Author

ikemuuu commented Jan 16, 2022

フィールドの地図が作れたら,別ターミナルを立ち上げて以下を実行.

rosrun map_server map_saver -f ~/map

すると,home 直下に,

  • map.pgm
  • map.yaml
    が作られる.

これを適切なフォルダに移動すればおしまい.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant