Skip to content

Std::string doesn't have such constructor, therefore wrong exception happens when waiting for action server is over #3331

@andriimaistruk

Description

@andriimaistruk

https://github.com/ros-planning/navigation2/blob/c6294747a59e41e51d6d833c9b6fe93123f78b8b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_node.hpp#L100

The exception message that is being printed in case an action server is not up by 1s is "Original error: basic_string::_M_create", whereas it should be Action server <action server name> not available"
One of the ways to fix it, in case it reproduces not only for me, is by replacing the above with

    std::runtime_error(std::string("Action server ") +  action_name + std::string(" not available"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions