Position_trajectory_controller is not explained in Unit 4

in controller_configuration.yaml
there is config position_trajectory_controller

position_trajectory_controller:
      type: joint_trajectory_controller/JointTrajectoryController

also in launch file, there is a node trying to load joint_trajectory_controller, not sure if it’s a typo because position_trajectory_controller != joint_trajectory_controller

 Node(
            package="controller_manager",
            executable="spawner",
            arguments=["joint_trajectory_controller",
                       "-c", "/controller_manager"],
        ),

Anyway, can any expert explain this unexplained part? Thanks

Hi @sunhongshuai, I think this is just a misunderstanding of naming a controller position_trajectory_controller with a type of joint_trajectory_controller/JointTrajectoryController due to a typo in the launch file.

In the launch file, you are spawning a controller wiht a name joint_trajectory_controller, so I imagine you will run into trouble when the node looks for the controller definition in controller_configuration.yaml.

We will fix this typo as soon as possible.

To understand it better, just know that you could name the controller anything you want in the .yaml, and spawn it by putting it’s name in the launch file, so something like:

my_custom_controller:
    type: joint_trajectory_controller/JointTrajectoryController

and you can spawn it with

 Node(
            package="controller_manager",
            executable="spawner",
            arguments=["my_custom_controller",
                       "-c", "/controller_manager"],
        ),

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.