Skip to content

Commit

Permalink
Rename mrpt_map -> mrpt_map_server
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jan 3, 2024
1 parent e735257 commit 97fad7b
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Documentation for each package
----------------------------------

Related to localization:
* [mrpt_map](mrpt_map): A node that loads a ROS standard gridmap or an MRPT or MP2P_ICP map and publishes it to a (set of) topic(s).
* [mrpt_map_server](mrpt_map_server): A node that loads a ROS standard gridmap or an MRPT or MP2P_ICP map and publishes it to a (set of) topic(s).
* [mrpt_pf_localization](mrpt_pf_localization): A node for particle filter-based localization of a robot from any kind of metric map (gridmap, points, range-only sensors, ...).

Related to sensor pipelines:
Expand Down
2 changes: 1 addition & 1 deletion mrpt_map/CHANGELOG.rst → mrpt_map_server/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package mrpt_map
Changelog for package mrpt_map_server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.0.3 (2022-06-25)
Expand Down
4 changes: 2 additions & 2 deletions mrpt_map/CMakeLists.txt → mrpt_map_server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(mrpt_map)
project(mrpt_map_server)

# find dependencies
find_package(ament_cmake REQUIRED)
Expand Down Expand Up @@ -43,7 +43,7 @@ ENDIF()
## Declare a cpp executable
add_executable(map_server_node
src/map_server_node.cpp
include/${PROJECT_NAME}/map_server_node.hpp)
include/${PROJECT_NAME}/map_server_node.h)

target_include_directories(map_server_node
PUBLIC
Expand Down
34 changes: 16 additions & 18 deletions mrpt_map/README.md → mrpt_map_server/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# mrpt_map

* [mrpt_map](#mrpt_map)
* [Overview](#overview)
* [Node: mrpt_map_server](#node-mrpt_map_server)
* [Working rationale](#working-rationale)
* [ROS Parameters](#ros-parameters)
* [Subscribed topics](#subscribed-topics)
* [Published topics](#published-topics)
* [Template ROS 2 launch files](#template-ros-2-launch-files)

<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
<!-- Regenerate with: gh-md-toc README.md -->
# mrpt_map_server

# Table of Contents
* [Overview](#Overview)
* [Node: mrpt_map_server](#Node:-mrpt_map_server)
* [Working rationale](#Working-rationale)
* [ROS Parameters](#ROS-Parameters)
* [Subscribed topics](#Subscribed-topics)
* [Published topics](#Published-topics)
* [Template ROS 2 launch files](#Template-ROS-2-launch-files)
* [Demos](#Demos)

## Overview
This package provides a ROS 2 node that publishes a static **map** for other nodes to use it.
Expand Down Expand Up @@ -50,24 +48,24 @@ of usage of each of these methods.

#### Related to ROS published topics:
* ``frame_id`` (Default=``map``): TF frame.
* `pub_mm_topic` (Default=`mrpt_map/metric_map`). Despite the map source, it will be eventually stored as a `mp2p_icp`'s `metric_map_t` (`*.mm`) structure, then each layer will be published using its **layer name** as a **topic name** and with the appropriate type
* `pub_mm_topic` (Default=`mrpt_map_server/metric_map`). Despite the map source, it will be eventually stored as a `mp2p_icp`'s `metric_map_t` (`*.mm`) structure, then each layer will be published using its **layer name** as a **topic name** and with the appropriate type
(e.g. PointCloud2, OccupancyGrid,...). Also, the whole metric map is published as a generic serialized object to the topic defined by the
parameter `pub_mm_topic`.

### Subscribed topics
None.

### Published topics
* ``mrpt_map/metric_map`` (``mrpt_msgs::msg::GenericObject``) (topic name can be changed with parameter `pub_mm_topic`).
* ``mrpt_map/<LAYER_NAME>`` (``nav_msgs::msg::OccupancyGrid``, ``sensors_msgs::msg::PointCloud2``, ...), one per map layer.
* ``mrpt_map_server/metric_map`` (``mrpt_msgs::msg::GenericObject``) (topic name can be changed with parameter `pub_mm_topic`).
* ``mrpt_map_server/<LAYER_NAME>`` (``nav_msgs::msg::OccupancyGrid``, ``sensors_msgs::msg::PointCloud2``, ...), one per map layer.

If using options 2 or 3 above, there will be just one layer named `map`.

### Template ROS 2 launch files

This package provides [launch/mrpt_map_server.launch.py](launch/mrpt_map_server.launch.py):

ros2 launch mrpt_map mrpt_map_server.launch.py
ros2 launch mrpt_map_server mrpt_map_server.launch.py

which can be used in user projects to launch the MRPT map server node, by setting these [launch arguments](https://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Using-Substitutions.html):

Expand All @@ -78,4 +76,4 @@ Launch an map server from a ROS yaml gridmap ([launch file](../mrpt_tutorials/la

```bash
ros2 launch mrpt_tutorials demo_map_server_gridmap_from_yaml.launch.py
```
```
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ROS 2 launch file for mrpt_map
# ROS 2 launch file for mrpt_map_server
#
# See the docs on the configurable launch arguments for this file in:
# https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_map#template-ros-2-launch-files
# https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_map_server#template-ros-2-launch-files
#

import os
Expand All @@ -14,7 +14,7 @@


def generate_launch_description():
# mrpt_map_pkg_dir = get_package_share_directory('mrpt_map')
# mrpt_map_pkg_dir = get_package_share_directory('mrpt_map_server')

map_yaml_file_arg = DeclareLaunchArgument(
'map_yaml_file', default_value=''
Expand All @@ -38,7 +38,7 @@ def generate_launch_description():

# Node: Local obstacles builder
mrpt_map_server_node = Node(
package='mrpt_map',
package='mrpt_map_server',
executable='map_server_node',
name='map_server_node',
output='screen',
Expand Down
4 changes: 2 additions & 2 deletions mrpt_map/package.xml → mrpt_map_server/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="3">
<name>mrpt_map</name>
<name>mrpt_map_server</name>
<version>1.0.3</version>
<description>The mrpt_map is able to publish a mrpt map as ros occupancy grid like the map_server</description>
<description>This package provides a ROS 2 node that publishes a static map for other nodes to use it. Unlike classic ROS 1 ``map_server``, this node can publish a range of different metric maps, not only occupancy grids.</description>

<maintainer email="[email protected]">Markus Bader</maintainer>
<maintainer email="[email protected]">Jose Luis Blanco-Claraco</maintainer>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| All rights reserved. Released under BSD 3-Clause license. See LICENSE |
+------------------------------------------------------------------------+ */

#include "mrpt_map/map_server_node.hpp"
#include "mrpt_map_server/map_server_node.h"

#include <mrpt/config/CConfigFile.h>
#include <mrpt/maps/CMultiMetricMap.h>
Expand All @@ -32,7 +32,7 @@ void MapServer::init()
RCLCPP_INFO(this->get_logger(), "debug: '%s'", m_debug ? "true" : "false");

// See:
// https://github.com/mrpt-ros-pkg/mrpt_navigation/blob/ros2/mrpt_map/README.md
// https://github.com/mrpt-ros-pkg/mrpt_navigation/blob/ros2/mrpt_map_server/README.md

// MAP FORMAT 2: "legacy" ROS1 grid maps:
// -------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion mrpt_navigation/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<depend>mrpt_pointcloud_pipeline</depend>
<depend>mrpt_pf_localization</depend>
<depend>mrpt_map</depend>
<depend>mrpt_map_server</depend>
<depend>mrpt_rawlog</depend>
<depend>mrpt_reactivenav2d</depend>
<depend>mrpt_tutorials</depend>
Expand Down
4 changes: 2 additions & 2 deletions mrpt_pf_localization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Refer to node launch arguments for details.
to start:

* ``mrpt_pf_localization`` with the map to be received via a ROS topic,
* ``mrpt_map`` server loading and publishing a gridmap as reference map via an ROS-styled ``map.yaml`` file,
* ``mrpt_map_server`` server loading and publishing a gridmap as reference map via an ROS-styled ``map.yaml`` file,
* ``rviz2`` for visualization,
* ``mvsim`` to simulate a live robot that can be teleoperated.

Expand Down Expand Up @@ -146,7 +146,7 @@ This package provides [launch/localization.launch.py](launch/localization.launch
which can be used in user projects to launch the MRPT PF localization node, by setting these [launch arguments](https://docs.ros.org/en/rolling/Tutorials/Intermediate/Launch/Using-Substitutions.html):

* ``mrpt_map_config_file``: Path to an INI file with metric map (mrpt::maps::CMetricMap) parameters to override the incoming map `likelihoodOptions`.
If this optional parameter is not provided, likelihood options will be taken from the map sent by the [mrpt_map](https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_map) node.
If this optional parameter is not provided, likelihood options will be taken from the map sent by the [mrpt_map_server](https://github.com/mrpt-ros-pkg/mrpt_navigation/tree/ros2/mrpt_map_server) node.
* ``pf_params_file`` (Default: [params/default.config.yaml](params/default.config.yaml)): If defined, overrides the default
particle filter algorithm. Note that probabilistic likelihood models for the metric maps are in an independent file (``mrpt_map_config_file``).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def generate_launch_description():

mrpt_map_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('mrpt_map'), 'launch',
get_package_share_directory('mrpt_map_server'), 'launch',
'mrpt_map_server.launch.py')]),
launch_arguments={
'map_yaml_file': os.path.join(tutsDir, 'maps', 'demo_world2.yaml'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def generate_launch_description():

mrpt_map_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('mrpt_map'), 'launch',
get_package_share_directory('mrpt_map_server'), 'launch',
'mrpt_map_server.launch.py')]),
launch_arguments={
'map_yaml_file': os.path.join(tutsDir, 'maps', 'demo_world2.yaml'),
Expand Down

0 comments on commit 97fad7b

Please sign in to comment.