how publish joint velocity command?
ROS MELODIC, GAZEBO 9 Hi, i'm working to set up a quadcopter simulation within gazebo. I have created the model and added 4 transmission element ( one for each motor ) and to control them i use the ros_control plugins. Thus, i have created a file.yaml in which i specify my controllers:
joint_motor_controller:
type: velocity_controllers/JointGroupVelocityController
joints:
- joint_front_right_prop
- joint_front_left_prop
- joint_back_left_prop
- joint_back_right_prop
gains:
joint_front_right_prop: {p: 10000, i: 1, d: 1000}
joint_front_left_prop: {p: 10000, i: 1, d: 1000}
joint_back_left_prop: {p: 10000, i: 1, d: 1000}
joint_back_right_prop: {p: 10000, i: 1, d: 1000}
the problem arise when i try to publish from a ros node the velocity. the publisher objects is :
ros::Publisher pub = n.advertise<std_msgs::Float64MultiArray("/drone/joint_motor_controller/command",4);
but when i run the node i get the node i get the following error in gazebo:
ERROR: dimension of command ( #) does not match number of joint (4).
any help??? thanks in advance.