Coder Social home page Coder Social logo

multirobot-mapmerge's Introduction

create a launch file in the folder you are working from and then launch in new terminal

  $ roslaunch [file] map_merge.launch

code as follows:

 <!-- Map megring (know inital position case)-->
  <group ns="/$(arg first_tb3)/map_merge">
    <param name="init_pose_x" value="$(arg first_tb3_x_pos)"/>
    <param name="init_pose_y" value="$(arg first_tb3_y_pos)"/>
    <param name="init_pose_z" value="$(arg first_tb3_z_pos)"/>
    <param name="init_pose_yaw" value="$(arg first_tb3_yaw)"/>
  </group>
  <group ns="/$(arg second_tb3)/map_merge">
    <param name="init_pose_x" value="$(arg second_tb3_x_pos)"/>
    <param name="init_pose_y" value="$(arg second_tb3_y_pos)"/>
    <param name="init_pose_z" value="$(arg second_tb3_z_pos)"/>
    <param name="init_pose_yaw" value="$(arg second_tb3_yaw)"/>
  </group>
  <group ns="/$(arg third_tb3)/map_merge">
    <param name="init_pose_x" value="$(arg third_tb3_x_pos)"/>
    <param name="init_pose_y" value="$(arg third_tb3_y_pos)"/>
    <param name="init_pose_z" value="$(arg third_tb3_z_pos)"/>
    <param name="init_pose_yaw" value="$(arg third_tb3_yaw)"/>
  </group>

  <!-- perform static transform publisher for three robots -->
  <node pkg="tf" type="static_transform_publisher" name="world_to_$(arg first_tb3)_tf_broadcaster"  args="0 0 0 0 0 0 /map /$(arg first_tb3)/map 100"/>
  <node pkg="tf" type="static_transform_publisher" name="world_to_$(arg second_tb3)_tf_broadcaster" args="0 0 0 0 0 0 /map /$(arg second_tb3)/map 100"/>
  <node pkg="tf" type="static_transform_publisher" name="world_to_$(arg third_tb3)_tf_broadcaster"  args="0 0 0 0 0 0 /map /$(arg third_tb3)/map 100"/>

    <!-- Launch the map_merge node along with transform publishers -->
    <node pkg="multirobot_map_merge" type="map_merge" respawn="false" name="map_merge" output="screen">
      <param name="robot_map_topic" value="map"/>
      <param name="robot_namespace" value="tb3"/>
      <param name="merged_map_topic" value="map"/>
      <param name="world_frame" value="map"/>
      <param name="known_init_poses" value="true"/>
      <param name="merging_rate" value="4.0"/>
      <param name="discovery_rate" value="0.1"/>
      <param name="estimation_rate" value="0.2"/>
      <!-- <param name="merging_rate" value="4.0"/> -->
      <!-- <param name="discovery_rate" value="0.05"/>
      <param name="estimation_rate" value="0.1"/> -->
      <param name="estimation_confidence" value="1.0"/>
  </node>

To run Rviz, add this into the launch file (the file used to declare launch base):

    <node pkg="rviz" type="rviz" name="rviz" args="-d $(find yourFolder)/rviz/multi_tb3_gmapping2.rviz"/>

multirobot-mapmerge's People

Contributors

hikashi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.