PlanSys2 / ros2_planning_system_examples

56 stars 30 forks source link

plansys_bt_example Fails to create plugins w/namespace. #6

Closed sethhoward closed 3 years ago

sethhoward commented 3 years ago

It's likely this is a user error but when running in a namespace ros2 launch plansys2_bt_example plansys2_bt_example_launch.py namespace:=robot

The bt_action_node fails to find any plugins (eg. move).

[bt_action_node-2] [INFO] [1608090932.363567900] [robot.move]: Node name: [move]
[bt_action_node-2] [INFO] [1608090932.365805800] [robot.move]: action_name: [move]
[bt_action_node-2] [INFO] [1608090932.365940100] [robot.move]: bt_xml_file: [/home/ubuntu/Desktop/Work/planning_ws/install/plansys2_bt_example/share/plansys2_bt_example/behavior_trees_xml/robot/move.xml]
[bt_action_node-2] terminate called after throwing an instance of 'rclcpp::exceptions::ParameterNotDeclaredException'
[bt_action_node-2]   what():  plugins
[ERROR] [bt_action_node-2]: process has died [pid 49005, exit code -6, cmd '/home/ubuntu/Desktop/Work/planning_ws/install/plansys2_bt_actions/lib/plansys2_bt_actions/bt_action_node --ros-args -r __node:=move -r __ns:=/robot --params-file /home/ubuntu/Desktop/Work/planning_ws/install/plansys2_bt_example/share/plansys2_bt_example/config/params.yaml --params-file /tmp/launch_params_jsjcsds0'].

The intention is to run several simulated robots in their own namespace via Nav2 and run several instances of Plansys2 running independently at the same time.

sethhoward commented 3 years ago

This was on me. The params file needs to be name spaced

robot:
  move:
    ros__parameters:
      plugins:

This does bring up an issue of how to run multiple bots without redefining the params.yaml for each bot and running colcon build each time (as the C++ libs appear to be generated for the bt trees at this time). An example would be amazing!