mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-08 02:37:45 +08:00
rtabmap.launch.py: fixed wrong relay remap names when compressed is false. Fixed warnings showing the base topic names and not the remap names. Added rtabmap.launch.py usage in example launch files. Install rtabmap.launch.py.
This commit is contained in:
@@ -29,7 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define INCLUDE_RTABMAP_ROS_COMMONDATASUBSCRIBERIMPL_H_
|
||||
|
||||
#include <rtabmap/utilite/UConversion.h>
|
||||
|
||||
#include <rtabmap_ros/GetTopicName.h>
|
||||
|
||||
#define DATA_SYNC2(PREFIX, SYNC_NAME, MSG0, MSG1) \
|
||||
typedef message_filters::sync_policies::SYNC_NAME##Time<MSG0, MSG1> PREFIX##SYNC_NAME##SyncPolicy; \
|
||||
@@ -122,8 +122,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL3(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2) \
|
||||
if(APPROX) \
|
||||
@@ -141,9 +141,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL4(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3) \
|
||||
if(APPROX) \
|
||||
@@ -161,10 +161,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str(), \
|
||||
SUB3.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB3.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL5(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4) \
|
||||
if(APPROX) \
|
||||
@@ -182,11 +182,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
approxSync?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str(), \
|
||||
SUB3.getTopic().c_str(), \
|
||||
SUB4.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB3.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB4.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL6(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5) \
|
||||
if(APPROX) \
|
||||
@@ -204,12 +204,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str(), \
|
||||
SUB3.getTopic().c_str(), \
|
||||
SUB4.getTopic().c_str(), \
|
||||
SUB5.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB3.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB4.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB5.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL7(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5, SUB6) \
|
||||
if(APPROX) \
|
||||
@@ -227,13 +227,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str(), \
|
||||
SUB3.getTopic().c_str(), \
|
||||
SUB4.getTopic().c_str(), \
|
||||
SUB5.getTopic().c_str(), \
|
||||
SUB6.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB3.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB4.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB5.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB6.getSubscriber()).c_str());
|
||||
|
||||
#define SYNC_DECL8(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5, SUB6, SUB7) \
|
||||
if(APPROX) \
|
||||
@@ -251,14 +251,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
subscribedTopicsMsg_ = uFormat("\n%s subscribed to (%s sync):\n %s,\n %s,\n %s,\n %s,\n %s,\n %s,\n %s", \
|
||||
name_.c_str(), \
|
||||
APPROX?"approx":"exact", \
|
||||
SUB0.getTopic().c_str(), \
|
||||
SUB1.getTopic().c_str(), \
|
||||
SUB2.getTopic().c_str(), \
|
||||
SUB3.getTopic().c_str(), \
|
||||
SUB4.getTopic().c_str(), \
|
||||
SUB5.getTopic().c_str(), \
|
||||
SUB6.getTopic().c_str(), \
|
||||
SUB7.getTopic().c_str());
|
||||
getTopicName(SUB0.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB1.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB2.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB3.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB4.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB5.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB6.getSubscriber()).c_str(), \
|
||||
getTopicName(SUB7.getSubscriber()).c_str());
|
||||
|
||||
|
||||
#endif /* INCLUDE_RTABMAP_ROS_COMMONDATASUBSCRIBERIMPL_H_ */
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* GetTopicName.h
|
||||
*
|
||||
* Created on: Oct 1, 2021
|
||||
* Author: mathieu
|
||||
*/
|
||||
|
||||
#ifndef INCLUDE_RTABMAP_ROS_GETTOPICNAME_H_
|
||||
#define INCLUDE_RTABMAP_ROS_GETTOPICNAME_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
template<class T>
|
||||
auto getTopicNameImpl(T const& obj, int)
|
||||
-> decltype(obj->get_topic_name(), std::string())
|
||||
{
|
||||
return obj->get_topic_name();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
auto getTopicNameImpl(T const& obj, long)
|
||||
-> decltype(obj.getTopic(), std::string())
|
||||
{
|
||||
return obj.getTopic();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
auto getTopicName(T const& obj)
|
||||
-> decltype(getTopicNameImpl(obj, 0), std::string())
|
||||
{
|
||||
return getTopicNameImpl(obj, 0);
|
||||
}
|
||||
|
||||
|
||||
#endif /* INCLUDE_RTABMAP_ROS_GETTOPICNAME_H_ */
|
||||
Reference in New Issue
Block a user