Robotics StackExchange | Archived questions

err when running custom ROS controller

I am trying to implement a custom ros_control effort controller.

As a first step, I created a copy of the effort_controllers package from the ros_controllers repo. Then I only kept the JointPositionController (https://github.com/ros-controls/ros_controllers/blob/melodic-devel/effort_controllers/src/joint_position_controller.cpp) and just renamed it to MyJointPositionController (both the C++ class and the plugin stuff). The code builds fine...

Then, in my config file I replaced effort_controllers/JointPositionController with effort_controllers/MyJointPositionController. However, when I spawn the controller I get the following error:

gzserver: /opt/ros/melodic/include/hardware_interface/joint_command_interface.h:60: void hardware_interface::JointHandle::setCommand(double): Assertion `cmd_' failed. Aborted (core dumped)

I am in ROS Melodic on Ubuntu 18.04.

Any idea what might be going wrong?

Asked by ptriantd on 2020-04-15 11:07:29 UTC

Comments

Hello! Could you finally solve the problem? I get the same serror

Asked by RamilK on 2021-05-04 06:30:14 UTC

Answers