How to enable stiffness using C++
Hello,
I want to enable/disable the stiffness using C++ API. But I don't know how to instantiate a service variable. I am not sure about what should I put between "<>". The code is attached bellow. Anyone can help me?
ros::init(argc, argv, "controller");
ros::NodeHandle n;
ros::Publisher controller_pub = n.advertise<geometry_msgs::Twist>("/cmd_vel", 1000);
ros::Rate loop_rate(10);
int count = 0;
ros::ServiceClient client = n.serviceClient<??>("/body_stiffness/enable");
while (ros::ok())
{
geometry_msgs::Twist control;
control.linear.x = 1;
control.linear.y = 0;
control.angular.z = 0;
controller_pub.publish(control);
ros::spinOnce();
loop_rate.sleep();
++count;
}