ros control assertion failed
I wrote a custom controller for my robot. I used ros control boilerplate (by dave coleman) for hardware interface. The code compiles but I get the following error.
myrobot_hw_main: /opt/ros/lunar/include/hardware_interface/posvel_command_interface.h:72: void hardware_interface::PosVelJointHandle::setCommandVelocity(double): Assertion `cmd_vel_' failed.
[myrobot/myrobot_hardware_interface-1] process has died [pid 96416, exit code -6, cmd /home/user/catkin_ws/devel/lib/control_pkg/myrobot_hw_main __name:=myrobot_hardware_interface __log:=/home/user/.ros/log/aee6bd46-702a-11e8-82d2-000c29ad2621/myrobot-myrobot_hardware_interface-1.log].
log file: /home/user/.ros/log/aee6bd46-702a-11e8-82d2-000c29ad2621/myrobot-myrobot_hardware_interface-1*.log
I wrote a controller for omni drive and if I understand it properly, this is where the problem is. I used this interface called PosVelJointInterface from posvel_command_interface.h. The problem occurs when I executed the following lines. Basically in my controller, I take in the twist command, do some math and generate four velocities which I'm trying to populate using the setCommandVelocity method.
hardware_interface::PosVelJointHandle wheel_1;
wheel_1.setCommandVelocity(wheelVelocities.velocity[0]);