Robotics StackExchange | Archived questions

i cant get this service to work.

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 ?

Asked by soshiant1992 on 2015-11-01 05:56:16 UTC

Comments

Answers