sensor_msgs/JointState in cpp
When I try set sensor_msgs/JointState and publish it
ros::Publisher joint_msg_pub = node.advertise<sensor_msgs::jointstate>("leg_joints_states", 1);
sensor_msgs::JointState joint_msg;
joint_msg.name[0] = "coxa_joint_r1";
joint_msg.position[0] = q_out(0);
joint_msg_pub.publish(joint_msg);
But when I launch node I get segmentation fault. I incorrectly set the value in the message? </sensor_msgs::jointstate>