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

update navigation, change param, namespace #29

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion cube_petit_navigation/config/odom_gazebo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cube_petit/diff_drive_controller:
left_wheel : "left_wheel_joint"
right_wheel : "right_wheel_joint"

publish_rate: 50.0
publish_rate: 100.0 #50
cmd_vel_timeout: 30.0
wheel_separation : 0.154
wheel_radius : 0.033
Expand Down
2 changes: 1 addition & 1 deletion cube_petit_navigation/config/odom_gazebo2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cube_petit/diff_drive_controller:
left_wheel : "left_wheel_joint"
right_wheel : "right_wheel_joint"

publish_rate: 50.0
publish_rate: 1000.0 #50
cmd_vel_timeout: 30.0
wheel_separation : 0.1403
wheel_radius : 0.0325
Expand Down
46 changes: 21 additions & 25 deletions cube_petit_navigation/launch/cube_petit_gmapping.launch
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
<?xml version="1.0"?>
<!-- -*- mode: XML -*- -->
<launch>
<!-- load cube_petit.xacro -->
<arg name="model" default="$(find cube_petit_description)/urdf/cube_petit_v2.xacro" />
<param name="robot_description" command="$(find xacro)/xacro $(arg model) --inorder"/>

<!-- [EDIT] topic name for scan -->
<arg name="scan" default="/pacecat/scan_filtered"/>

<!-- launch gmapping node and make map -->

<node name="slam_gmapping" pkg="gmapping" type="slam_gmapping" required="true" output="screen" ns="/gmapping">
<remap from="scan" to="$(arg scan)"/>
<param name="linearUpdate" value="0.1"/>
<param name="angularUpdate" value="0.125"/>
<param name="throttle_scans" value="1"/>
<param name="maxUrange" value="20.0"/>
<param name="maxRange" value="20.0"/>
<param name="delta" value="0.1"/>
</node>

<!-- map convert to image node -->
<param name="gmapping/map_image/full/compressed/format" value="png" />
<node name="map_to_image" pkg="hector_compressed_map_transport" type="map_to_image_node" output="screen" ns="/gmapping">
<remap from="pose" to="robot_pose" />
</node>

<!-- load cube_petit.xacro -->
<arg name="model" default="$(find cube_petit_description)/urdf/cube_petit_v2.xacro"/>
<param name="robot_description" command="$(find xacro)/xacro $(arg model) --inorder"/>
<!-- [EDIT] topic name for scan -->
<arg name="scan" default="/pacecat/scan_filtered"/>
<!-- launch gmapping node and make map -->
<node name="slam_gmapping" pkg="gmapping" type="slam_gmapping" required="true" output="screen">
<remap from="scan" to="$(arg scan)"/>
<param name="linearUpdate" value="0.1"/>
<param name="angularUpdate" value="0.125"/>
<param name="throttle_scans" value="1"/>
<param name="maxUrange" value="20.0"/>
<param name="maxRange" value="20.0"/>
<param name="delta" value="0.1"/>
</node>
<!-- map convert to image node -->
<param name="gmapping/map_image/full/compressed/format" value="png"/>
<node name="map_to_image" pkg="hector_compressed_map_transport" type="map_to_image_node" output="screen">
<remap from="pose" to="robot_pose"/>
</node>
</launch>

130 changes: 60 additions & 70 deletions cube_petit_navigation/launch/cube_petit_navigation.launch
Original file line number Diff line number Diff line change
@@ -1,79 +1,69 @@
<?xml version="1.0"?>
<launch>
<!-- Set and remove parameter for web console. -->
<arg name="map_info_file" default="/home/gisen/map/M20210525165127330/map_info.yaml"/>
<!-- Set and remove parameter for web console. -->
<!-- <arg name="map_info_file" default="/home/gisen/map/M20210525165127330/map_info.yaml"/>
<rosparam command="load" file="$(arg map_info_file)" ns="map_info"/>
<rosparam command="delete" param="map_info/building_id"/>
<rosparam command="delete" param="map_info/floor_id"/>
<group ns="navigation">

<!--[EDIT] robot name-->
<arg name="robot" default="cube_petit"/>
<!--[EDIT] topic name of /scan-->
<arg name="scan" default="/pacecat/scan_filtered"/>
<!--[EDIT] topic name of /odom-->
<arg name="odom" default="/cube_petit/diff_drive_controller/odom"/>

<!-- [EDIT] map file name-->
<!-- <arg name="map_file" default="$(find cube_petit)/map/daikaigisitu/map.yaml"/> -->

<!-- <arg name="map_file" default="$(find cube_petit_gazebo)/map/floor_eight/map.yaml"/> -->
<!-- <arg name="map_file" default="$(find cube_petit_navigation)/map/airi_v2/map.yaml"/> -->
<arg name="map_file" default="$(find cube_petit_navigation)/map/floor_27_2/3/map.yaml"/>

<!-- [EDIT] keepout map file name if you need -->
<arg name="map_keepout_file" default="$(find cube_petit_navigation)/map/floor_27_2/3/map.yaml" />
<arg name="use_keepout" default="true" />
<param name="map_server/map_file" value="$(arg map_file)" />





<!-- If "costmap_image = true" launch costmap_to_image node -->
<arg name="costmap_image" default="false" />

<!-- Navigation parameter files -->
<arg name="move_base_include" default="$(find cube_petit_navigation)/launch/include/move_base.launch.xml"/>
<arg name="amcl_include" default="$(find cube_petit_navigation)/launch/include/amcl.launch.xml"/>


<!-- serve up a map -->
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"/>

<!-- serve up a map with keepout zones -->
<group if="$(arg use_keepout)" >
<rosparam command="delete" param="map_info/floor_id"/> -->
<!-- <group ns="navigation"> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消す

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除します

<!--[EDIT] robot name-->
<arg name="robot" default="cube_petit"/>
<!--[EDIT] topic name of /scan-->
<arg name="scan" default="/pacecat/scan_filtered"/>
<!--[EDIT] topic name of /odom-->
<arg name="odom" default="/cube_petit/diff_drive_controller/odom"/>
<!-- [EDIT] map file name-->
<!-- <arg name="map_file" default="$(find cube_petit)/map/daikaigisitu/map.yaml"/> -->
<arg name="map_info_file" default="(find cube_petit)/map/daikaigisitu/map.yaml"/>
<rosparam command="load" file="$(arg map_info_file)" ns="map_info"/>
<!-- <arg name="map_file" default="$(find cube_petit_gazebo)/map/floor_eight/map.yaml"/> -->
<!-- <arg name="map_file" default="$(find cube_petit_navigation)/map/airi_v2/map.yaml"/> -->
<arg name="map_file" default="$(find cube_petit_navigation)/map/floor_27_2/3/map.yaml"/>
<!-- <arg name="map_file" default="$(find cube_petit_navigation)/map/maker_fair/map.yaml"/> -->
<!-- <arg name="map_file" default="/home/gisen/map_24/map2/map.yaml"/> -->
<!-- [EDIT] keepout map file name if you need -->
<arg name="map_keepout_file" default="$(find cube_petit_navigation)/map/floor_27_2/3/map.yaml"/>
<!-- <arg name="map_keepout_file" default="$(find cube_petit_navigation)/map/maker_fair/map.yaml" /> -->
<!-- <arg name="map_keepout_file" default="/home/gisen/map_24/map2/map.yaml"/> -->
<arg name="use_keepout" default="true"/>
<param name="map_server/map_file" value="$(arg map_file)"/>
<!-- <rosparam command="load" file="$(arg map_info_file)" ns="map_info"/> -->
<!-- <node pkg="tf" type="static_transform_publisher" name="odom_tf" args="0 0 0 0 0 0 map odom 100" /> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消す

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除します

<!-- If "costmap_image = true" launch costmap_to_image node -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントの内容と書かれている内容が異なる

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除しました

<arg name="costmap_image" default="false"/>
<!-- Navigation parameter files -->
<arg name="move_base_include" default="$(find cube_petit_navigation)/launch/include/move_base.launch.xml"/>
<arg name="amcl_include" default="$(find cube_petit_navigation)/launch/include/amcl.launch.xml"/>
<!-- serve up a map -->
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)"/>
<!-- serve up a map with keepout zones -->
<group if="$(arg use_keepout)">
<node name="map_keepout_server" pkg="map_server" type="map_server" args="$(arg map_keepout_file)">
<remap from="map" to="map_keepout" />
<remap from="static_map" to="static_map_keepout" />
<remap from="map" to="map_keepout"/>
<remap from="static_map" to="static_map_keepout"/>
</node>
</group>

<!-- localize the robot -->

<include file="$(arg amcl_include)">
<arg name="scan_topic" value="$(arg scan)"/>
</include>

<group ns="rviz_topics_relay">
<node name="clicked_point_relay" pkg="topic_tools" type="relay" args="/clicked_point /navigation/clicked_point"/>
<node name="initialpose_relay" pkg="topic_tools" type="relay" args="/initialpose /navigation/initialpose"/>
<node name="simple_goal_relay" pkg="topic_tools" type="relay" args="/move_base_simple/goal /navigation/move_base_simple/goal"/>
</group>


<!-- move the robot -->
<include file="$(arg move_base_include)">
<arg if="$(arg use_keepout)" name="map_topic" value="map_keepout" />
<arg name="robot" value="$(arg robot)"/>
<!-- [EDIT] topic name of /odom -->
<arg name="odom_topic" value="$(arg odom)" />
<arg name="costmap_image" value="$(arg costmap_image)" />
<remap from="move_base_simple/goal" to="/move_base_simple/goal"/>
<remap from="initial_pose" to="/initial_pose"/>
<remap from="clicked_point" to="/clicked_point"/>

</include>
</group>
<!-- localize the robot -->
<include file="$(arg amcl_include)">
<arg name="scan_topic" value="$(arg scan)"/>
</include>
<!-- <group ns="rviz_topics_relay">
<node name="clicked_point_relay" pkg="topic_tools" type="relay" args="/clicked_point /clicked_point"/>
<node name="initialpose_relay" pkg="topic_tools" type="relay" args="/initialpose /initialpose"/>
<node name="simple_goal_relay" pkg="topic_tools" type="relay" args="/move_base_simple/goal /move_base_simple/goal"/>
</group> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消す

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除しました

<!-- move the robot -->
<include file="$(arg move_base_include)">
<arg if="$(arg use_keepout)" name="map_topic" value="map_keepout"/>
<arg name="robot" value="$(arg robot)"/>
<!-- [EDIT] topic name of /odom -->
<arg name="odom_topic" value="$(arg odom)"/>
<arg name="costmap_image" value="$(arg costmap_image)"/>
<!-- <remap from="move_base_simple/goal" to="/move_base_simple/goal"/>
<remap from="initial_pose" to="/initial_pose"/>
<remap from="clicked_point" to="/clicked_point"/> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消す

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除しました

</include>
<!-- </group> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

消す

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

削除しました



</launch>
5 changes: 5 additions & 0 deletions cube_petit_navigation/map/maker_fair/map.pgm

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions cube_petit_navigation/map/maker_fair/map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: map.pgm
resolution: 0.100000
origin: [-100.000000, -100.000000, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196