Control quiz - problem with motion

Two questions:

  1. After I run the launch file quiz_control.launch in my quiz_control package, I can see the controllers by typing rostopic list and I am able to move the robot by publishing commands with rostopic pub. So why am I i losing points on the quiz for that? For example, after raising the shoulder with shoulder_lift, I can run
    rostopic pub -1 /ur5/elbow_joint_position_controller/command std_msgs/Float64 “data: -0.3”
    to make the elbow move and follow that with commands to make the wrists move.

  2. When I made my custom controller and use it for the shoulder lift joint, it doesn’t load, just as described at the end of 4 - Create a Controller. Can you help with that? From the way the quiz is graded, it doesn’t look like I’m losing points for that. But it’s hard to tell how the quiz is testing the project_controller package.

Hello @mccolgm,

  1. The problem is with the /ur5/joint_states . You are not loading this topic, instead, you are loading /rrbot/joint_states. Furthermore, you are loading this topic with the robot_state_publisher, which is not the purpose of this course. You should load this controller the same way you are loading the rest of controllers (configuring it in the yaml file, which you already have, and loading it using the controller_spawner node).

  2. The problem here is with the plugin code. You are using an EffortJointInterface, but for this specific robot, the interface to use is PositionJointInterface. You can see this by investigating a little bit in the ur_descrpition package, specifically, in the ur.transmission.xacro file.

Hope this helps you,

Thanks so much, it definitely helped. One question about the custom controller. I changed the code to use a positionJointInterface and reran the make file. i did NOT get an error about it not loading. But, it doesn’t show up when I look at the list of topics. But, it moved the robot arm. How did that work?

Hello @mccolgm,

That’s the expected behavior. The way the controller code is written is to move the arm to an specific position when loaded. It’s not supposed to provide any topic so that you can publish into it (like the other controllers do). You could add a topic to the custom controller as well, but you would need to modify the code (in fact, this would be an interesting extra exercise to do).

Best,