i cant get this service to work.

asked 2015-11-01 04:56:16 -0600

soshiant1992 gravatar image

updated 2015-11-03 16:11:16 -0600

Jose Luis Rivero gravatar image

hello

i'm working with nao h25 in gazebo . i was working with joint efforts and i noticed that if i change them in urdf file it is effective in gazebo. but when i try to change them using ros services i can't get it to work.

my code is as follows:

ros::init(argc, argv, "t1");
ros::NodeHandle handle1;  
ros::ServiceClient stiffc = handle1.serviceClient<gazebo_msgs::ApplyJointEffort>("/gazebo/apply_joint_effort");
bool a1 ;
gazebo_msgs::ApplyJointEffort lshoulderpitch ;
lshoulderpitch.request.joint_name="LShoulderPitch";
lshoulderpitch.request.effort=0;
lshoulderpitch.request.start_time.fromSec(1);
lshoulderpitch.request.duration.fromSec(333);
a1=stiffc.call(lshoulderpitch);

where i'm going wrong ? can anybody help me ?

edit retag flag offensive close merge delete