126
Velodyne scans are published as sensor_msgs::PointCloud2 ROS messages on the topic
/velodyne_points with respect to /velodyne frame at 10Hz. The scan messages can be recorded
by a robotic vehicle to build a map on the fly that could be used for other purposes such as path
planning and obstacle avoidance. Please see
Synchronize Computer to Stencil 2
section for how
to establish ROS message communication between Stencil 2 and another computer.
I M P O R T A N T L O C A L I Z A T I O N T O P I C S
By default, localization starts at the map origin (The location and orientation Stencil 2 was in
when you started building the previous map). Users can change the starting pose (see
Parameters
section under
mapLocalization
). Also, a callback function is provided to reset the
sensor pose during localization (see the same section). You can publish a pose on this topic
(/pose_reset) and the localization estimate will jump to that position. This could also be used to
manually set the start position for example.
It is possible to freeze the sensor pose updates during operation. The program listens to
std_msgs::Bool
typed messages on topic
/isSensorMoving
. Upon start, the status is set to
true. Sending false will lock the sensor pose and sending true will resume the estimation.
R E P O R T I N G G L O B A L P O S I T I O N D U R I N G L O C A L I Z A T I O N
Stencil 2 can localize on a geo-referenced map created by Stencil 2 using the Loop Closure tool
with GNSS data. When using this map, Stencil 2 can publish pose information in the Global frame
on a new topic if it is set up as described.
Stencil uses two topics to accomplish this. The user can set the origin of the GNSS loop closed
map by publishing /geo/set_origin with the UTM offsets of the map origin. Stencil will use these
values to offset the local x, y, z values into the global reference frame and publish these on the
/geo/global_pose topic which has the same format as the standard ROS pose messages.
L O C A L I Z I N G B A S E D O N C U R R E N T G N S S L O C A T I O N
This feature allows a user to initialize their position using current GNSS coordinates at the start
of localization rather than needing to start at the origin or ending location of the map.
There are several requirements for getting this to work correctly:
1)
You will need to build an accurate map while collecting high quality GNSS data. A fix
quality of 4 or better is preferred. A fix quality of 5 may work. Usually running the PPK
process will increase the fix quality 5 data to fix quality 4.
2)
You will need to use the Loop Closure Tool to Geo-register the map. You should be able to
compare the loop closed Stencil trajectory with the original GNSS trajectory and see a
close match between the two.