Visualize robot in gmapping
Hi
I have gmapping working for my mobile robot.
Now I can see the position of my robot by visualizing tf, so that I can see the base link and laser. But I want to see a simplified version of my robot, a rectangle should do, but how do I get this?
Thanks!
EDIT: This is my current launch file:
<?xml version="1.0"?>
<launch>
<!-- start hokuyo_node -->
<node name="hokuyo_node" pkg="hokuyo_node" type="hokuyo_node" output="screen"/>
<arg name="tf_map_scanmatch_transform_frame_name" default="scanmatcher_frame"/>
<arg name="base_frame" default="base_footprint"/>
<arg name="odom_frame" default="nav"/>
<arg name="pub_map_odom_transform" default="true"/>
<arg name="scan_subscriber_queue_size" default="5"/>
<arg name="scan_topic" default="scan"/>
<arg name="map_size" default="2048"/>
<!-- start odometry_node -->
<node name="odometry" pkg="mastering_ros_demo_pkg" type="odometry" output="screen"/>
<!-- start g_mapping -->
<node name="slam_gmapping" pkg="gmapping" type="slam_gmapping" output="screen">
<param name="ogain" value="10"/> <!-- default 3 -->
<param name="throttle_scans" value="1"/>
<param name="map_update_interval" value="1"/>
<param name="iterations" value="20"/> <!-- default 5 -->
<param name="lsigma" value="0.075"/> <!-- default 0.075 -->
<param name="delta" value="0.03"/> <!-- default 0.05 -->
<param name="linearUpdate" value="0.5"/> <!-- default 1.0 -->
<param name="angularUpdate" value="0.5"/> <!-- default 0.5 -->
</node>
<!-- Frame names -->
<param name="map_frame" value="map" />
<!--
<param name="base_frame" value="$(arg base_frame)" />
<param name="odom_frame" value="$(arg odom_frame)" />
-->
<param name="base_frame" value="base_frame" />
<param name="odom_frame" value="base_frame" />
<!-- Tf use -->
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<!--
<param name="pub_map_odom_transform" value="$(arg pub_map_odom_transform)"/>
-->
<param name="pub_map_odom_transform" value="true"/>
<!-- Map size / start point -->
<param name="map_resolution" value="0.010"/>
<param name="map_size" value="$(arg map_size)"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5" />
<param name="map_multi_res_levels" value="2" />
<!-- Map update parameters -->
<param name="update_factor_free" value="0.4"/>
<param name="update_factor_occupied" value="0.9" />
<param name="map_update_distance_thresh" value="0.4"/>
<param name="map_update_angle_thresh" value="0.06" />
<param name="laser_z_min_value" value = "-1.0" />
<param name="laser_z_max_value" value = "1.0" />
<!-- Advertising config -->
<param name="advertise_map_service" value="true"/>
<param name="scan_subscriber_queue_size" value="$(arg scan_subscriber_queue_size)"/>
<param name="scan_topic" value="$(arg scan_topic)"/>
<!-- Debug parameters -->
<!--
<param name="output_timing" value="false"/>
<param name="pub_drawings" value="true"/>
<param name="pub_debug_output" value="true"/>
-->
<param name="tf_map_scanmatch_transform_frame_name" value="$(arg tf_map_scanmatch_transform_frame_name)" />
<!--
</node>
-->
<node pkg="tf" type="static_transform_publisher" name="map_nav_broadcaster" args="-0.45 0 0 3.1765 0 3.1415 /base_link /laser 100"/>
<node pkg="rviz" type="rviz" name="rviz"/>
</launch>