Browse Source

Improve ROS args for FUNMAP mapping.launch

bugfix/gazebo_rviz
Binit Shah 3 years ago
parent
commit
4b7f1f34e2
2 changed files with 8 additions and 8 deletions
  1. +7
    -7
      stretch_funmap/launch/mapping.launch
  2. +1
    -1
      stretch_funmap/nodes/funmap

+ 7
- 7
stretch_funmap/launch/mapping.launch View File

@ -1,6 +1,8 @@
<launch> <launch>
<arg name="debug_directory" value="$(env HELLO_FLEET_PATH)/debug/"/>
<arg name="rviz" default="true" doc="whether to show Rviz" />
<arg name="map_yaml" default="''" doc="previously captured FUNMAP map (optional)" />
<arg name="debug_directory" default="$(env HELLO_FLEET_PATH)/debug/" doc="directory where debug imagery is saved" />
<!-- REALSENSE D435i --> <!-- REALSENSE D435i -->
<include file="$(find stretch_core)/launch/d435i_high_resolution.launch"></include> <include file="$(find stretch_core)/launch/d435i_high_resolution.launch"></include>
@ -20,10 +22,8 @@
<include file="$(find stretch_core)/launch/stretch_driver.launch" pass_all_args="true"/> <include file="$(find stretch_core)/launch/stretch_driver.launch" pass_all_args="true"/>
<!-- --> <!-- -->
<!-- MAPPING -->
<!-- example of args for funmap that loads a map on launch (should have double hyphen before load_map) -->
<!-- load_map FILENAME -->
<node name="funmap" pkg="stretch_funmap" type="funmap" output="screen" >
<!-- FUNMAP -->
<node name="funmap" pkg="stretch_funmap" type="funmap" output="screen" args="--load_map $(arg map_yaml)">
<param name="debug_directory" type="string" value="$(arg debug_directory)"/> <param name="debug_directory" type="string" value="$(arg debug_directory)"/>
</node> </node>
<!-- --> <!-- -->
@ -37,11 +37,11 @@
<!-- --> <!-- -->
<!-- KEYBOARD TELEOP --> <!-- KEYBOARD TELEOP -->
<node name="keyboard_teleop" pkg="stretch_core" type="keyboard_teleop" output="screen" args='--mapping_on'/>
<node name="keyboard_teleop" pkg="stretch_core" type="keyboard_teleop" output="screen" args='--mapping_on' />
<!-- --> <!-- -->
<!-- VISUALIZE --> <!-- VISUALIZE -->
<node name="rviz" pkg="rviz" type="rviz" output="screen" args="-d $(find stretch_funmap)/rviz/stretch_mapping.rviz" />
<node name="rviz" pkg="rviz" type="rviz" output="screen" args="-d $(find stretch_funmap)/rviz/stretch_mapping.rviz" if="$(arg rviz)" />
<!-- --> <!-- -->
</launch> </launch>

+ 1
- 1
stretch_funmap/nodes/funmap View File

@ -1381,7 +1381,7 @@ if __name__ == '__main__':
parser.add_argument('--load_map', default=None, parser.add_argument('--load_map', default=None,
help='Provide directory from which to load a map.') help='Provide directory from which to load a map.')
args, unknown = parser.parse_known_args() args, unknown = parser.parse_known_args()
map_filename = args.load_map
map_filename = args.load_map if args.load_map else None
node = FunmapNode(map_filename) node = FunmapNode(map_filename)
node.main() node.main()
rospy.spin() rospy.spin()

Loading…
Cancel
Save