Ros_control 101 Quiz Issues

Hello - maybe Im overthinking things, but Im attempting to initialize my UR5 control arm according to the Step 4 Custom Controller instructions and I cant figure out how to launch the UR5 arm into the desired final position…

Ive researched the ur_description package and I couldnt find a way to initialize a position, as well as looking for examples for the yaml configurations…

The only thing I can think is to create a launch file that starts the controller_manager/spawner with the correct arguments, and then a .py file created that publishes specific data: X.X cmds to each of the necessary ur5/*/command topics?

I executed the quiz using the python script and received 7/10 marks… with the error:

“Custom controller not correctly registered”

Is this because I simply imported the .yaml file from ‘quiz_control’ pkg into my project_controller launch file?

quiz_control_custom.launch

<launch>
  <rosparam file="$(find quiz_control)/config/quiz_controller.yaml" command="load"/>

  <node name="controller_spawner" 
        pkg="controller_manager"
        type="spawner"
        respawn="false"
        output="screen" 
        ns="/ur5" 
        args="shoulder_lift_joint_position_controller
              shoulder_pan_joint_position_controller
              wrist_1_joint_position_controller
              wrist_2_joint_position_controller
              wrist_3_joint_position_controller
              joint_state_controller"/>

  <node name="custom_controller"
        pkg="project_controller"
        type="custom_controller.py"
        output="screen"/>

</launch>

and there is no custom controller registered as “project_controller”???

Hello @rbed23,

In order to initialize the joint to a certain position, you have to do it (in this case) from the custom controller C++ file itself. Similar to what you did in the previous Unit. If you have not created this custom controller, then probably this is why it’s not detecting it in the corrector.

Best,