How to keep publishing OGM when using stereo_odometry node ?

classic Classic list List threaded Threaded
3 messages Options
mi
Reply | Threaded
Open this post in threaded view
|

How to keep publishing OGM when using stereo_odometry node ?

mi
Hi. :)
I was successfully running RTAB-MAP in ROS2 with my own odometry using as node_executable='rtabmap. Now I'd like to run using RTABMAP's odometry. The following piece of code is working, but the grid map is not being published anymore. Could you please confirm what I should do to keep publishing such information? Tks in advance.

def generate_launch_description():
    parameters=[{
        "frame_id":"base_link",
        "subscribe_depth":False,
        "subscribe_rgbd":False,
        "subscribe_stereo":True,
        "Grid/FromDepth":"true",
        "Grid/RayTracing":"true",
        "Rtabmap/DetectionRate":"1.0",
        "Stereo/DenseStrategy":"1",
        "map_always_update":True,
        "approx_sync":False}]

    remappings=[
        ('left/image_rect', '/image/left'),
        ('right/image_rect', '/image/right'),
        ('left/camera_info', '/left/camera_info'),
        ('right/camera_info', '/right/camera_info')
    ]

    return LaunchDescription([
        # Set env var to print messages to stdout immediately
        SetEnvironmentVariable('RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED', '1'),
        Node(
            package='rtabmap_ros', node_executable='stereo_odometry', output='screen',
            parameters=parameters,
            remappings=remappings,
            arguments=['-d'] #, '--udebug']
        ),

        Node(
            package='rtabmap_ros', node_executable='rtabmapviz', output='screen',
            parameters=parameters,
            remappings=remappings
        ),
    ])
Reply | Threaded
Open this post in threaded view
|

Re: How to keep publishing OGM when using stereo_odometry node ?

matlabbe
Administrator
Hi,

You just removed rtabmap node, so it is normal that no map is created. You should also keep:
        Node(
            package='rtabmap_ros', node_executable='rtabmap', output='screen',
            parameters=parameters,
            remappings=remappings,
            arguments=['-d'] #, '--udebug']
        ), 

cheers,
Mathieu
mi
Reply | Threaded
Open this post in threaded view
|

Re: How to keep publishing OGM when using stereo_odometry node ?

mi
Thanks!!