GPS Coordinates to Map Coordinates
Hello,
I would like to initialize my robot on a map through GPS for a navigation task. How can I convert GPS coordinates to map Coordinates?
Thanks
UPDATE 1
I am using the following launch files:
<launch>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="magnetic_declination_radians" value="0"/>
<param name="roll_offset" value="0"/>
<param name="pitch_offset" value="0"/>
<param name="yaw_offset" value="0"/>
<param name="zero_altitude" value="false"/>
<remap from="/imu/data" to="/robot/imu" />
<remap from="/gps/fix" to="/robot/gps" />
<remap from="/odometry/gps" to="/initialpose" />
</node>
</launch>
Launch file for ekf_localization_node
<launch>
<!-- This node will take in measurements from odometry, IMU, stamped pose, and stamped twist messages. It tracks
the state of the robot, with the state vector being defined as X position, Y position, Z position,
roll, pitch, yaw, and the respective velocites for those quantities. Accelerations are not used (yet).
Units for all measurements are assumed to be in meters and radians. By default, the node outputs an
Odometry message with the topic name odometry/filtered -->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization" clear_params="true">
<!-- Set initial pose of the robot through code or rviz -->
<remap from="set_pose" to="initialpose"/>
<!-- The frequency, in Hz, at which the filter will output a position estimate. Note that
the filter will not begin computation until it receives at least one message from
one of the inputs. It will then run continuously at the frequency specified here,
regardless of whether it receives more measurements. -->
<param name="frequency" value="30"/>
<!-- The period, in seconds, after which we consider a sensor to have timed out. In this event, we
carry out a predict cycle on the EKF without correcting it. This parameter can be thought of
as the minimum frequency with which the filter will generate output. -->
<param name="sensor_timeout" value="0.1"/>
<!-- The filter accepts an arbitrary number of inputs from each input message type (Odometry, PoseStamped,
TwistStamped, Imu). To add a new one, simply append the next number in the sequence to its base name,
e.g., odom0, odom1, twist0, twist1, imu0, imu1, imu2, etc. The value should be the topic name. -->
<param name="odom0" value="robot/odom"/>
<param name="imu0" value="robot/imu"/>
<!-- Each sensor reading updates some or all of the filter's state. These options give you greater control over
which values from each measurement are fed to the filter. For example, if you have an odometry message as input,
but only want to use its Z position value, then set the entire vector to false, except for the third entry.
The order of the values is x, y, z, roll, pitch, yaw, vx, vy, vz, vroll, vpitch, vyaw. Note that not some message
types lack certain variables. For example, a TwistWithCovarianceStamped message has no pose information, so the first
six values would be meaningless in that case. -->
<rosparam param="odom0_config">[false, false, true, true, true, true, true, true, true, true, true, true]</rosparam>
<rosparam param="imu0_config">[false, false, false, true, true, true ...
What are map coordinates for you? What are GPS coordinates for you? What do you want to do? Might a TF link be a better choice?
I'm using the navigation stack, so I believe map is in the UTM frame and GPS is of type
sensor_msgs/NavSatFix
message (Not sure about the coordinate frame)