How to send commands to my controller in Chapter 3

Hello,

After building my controller as prompted in the notes, everything went well.

However, I have few questions,
1- In the c++ controller code, I get two warnings regarding gain_ and setpoint_ in JointHandle joint_ mentioning that they require constexpr identifier.

2- How do i publish commands to joint1 new controller. I couldn’t find the topics for it.

3- After running the launch file at the end, the robot’s first joint rotate to a certain angle which I assume is the setpoint defined in the c++ code. However, i does not matter how much I change the setpoint or the gain, every time I run the launch file, the robot behaves the same way. Why is that. I tried resetting the simulation and running catkin_make again, nothing changed.

Thank you

Hello @engahmad101,

  1. About these warnings you mention, do you get them in the IDE or in the Web Shell on the compilation? In any case, I don’t think they are important for this case.

  2. This controller example is not built to have a topic where to publish. It just moves the joint and ends. In order to have a topic where to publish, you should modify the C++ code.

  3. Did you remove the build and devel folders? This is very important for the new controller to have effect. If you remove these folders, recompile, and reload (not just reset) the simulation, you should see a different behavior when starting the controller.

Best,

Wow - this is a key tip. I had taken the C++ for Robotics as a refresher, but this hadn’t come up. This solved a lot of problems. Thanks.
/K