occupancy grid and pose
Hi All,
i'm new to ROS so I am trying to understand how things works.
I have a gmapping process, with urg_node and laser_scan_matcher.
I am getting the occupancy grid via a C# subscriber on Windows, but i am unable to figure out how to get the pose and orientation, and translate that into the occupancy grid coordinates.
I have /pose_stamped which is published by the laser_scan_matcher, but can't figure out how to translate the position and orientation into grid coordinates.
In RViz i get the occupancy grid and pose just fine, but i need to be able to convert the pose and orientation so i can process the data in my program (basically i need to save the position and orientation correlated to the occupancy grid, every time i press a key on my keyboard) and show that on the screen.
here's the launch file i am using:
<?xml version="1.0"?>
<launch>
<node pkg="urg_node" type="urg_node" name="scan">
<param name="ip_address" value="192.168.10.128"/>
<param name="frame_id" value="base_link"/>
<param name="calibrate_time" type="bool" value="true"/>
<param name="intensity" type="bool" value="false"/>
<param name="min_ang" value="-2.35619443"/>
<param name="max_ang" value="2.35619443"/>
<remap from="scan" to="base_scan" />
</node>
<node pkg="tf" type="static_transform_publisher" name="base_link_to_base_laser_link" args="0.0 0 0.0 0.0 0.0 0.0 /base_link /base_laser_link 100" />
<node name="gmapping" pkg="gmapping" type="slam_gmapping" args="scan:=scan" output="screen">
<param name="map_update_interval" value="0.5"/>
<param name="maxUrange" value="16.0"/>
<param name="sigma" value="0.05"/>
<param name="kernelSize" value="1"/>
<param name="lstep" value="0.05"/>
<param name="astep" value="0.05"/>
<param name="iterations" value="5"/>
<param name="lsigma" value="0.075"/>
<param name="ogain" value="3.0"/>
<param name="lskip" value="0"/>
<param name="srr" value="0.01"/>
<param name="srt" value="0.02"/>
<param name="str" value="0.01"/>
<param name="stt" value="0.02"/>
<param name="linearUpdate" value="0.01"/>
<param name="angularUpdate" value="0.01"/>
<param name="temporalUpdate" value="-1.0"/>
<param name="resampleThreshold" value="0.5"/>
<param name="particles" value="10"/>
<param name="xmin" value="-10.0"/>
<param name="ymin" value="-10.0"/>
<param name="xmax" value="10.0"/>
<param name="ymax" value="10.0"/>
<param name="delta" value="0.01"/>
<param name="llsamplerange" value="0.01"/>
<param name="llsamplestep" value="0.01"/>
<param name="lasamplerange" value="0.005"/>
<param name="lasamplestep" value="0.005"/>
</node>
<node pkg="laser_scan_matcher" type="laser_scan_matcher_node" name="laser_scan_matcher_node" output="screen">
<param name="fixed_frame" value = "odom"/>
<param name="publish_tf" value="true"/>
<param name="publish_odom" value="true"/>
<param name="max_iterations" value="10"/>
<param name="use_imu" value="false"/>
<param name="use_odom" value="false"/>
<param name="use_alpha_beta" value="false"/>
<param name="publish_pose_stamped " value="true" />
</node>
</launch>
Thanks