[ERROR] [1672315485.215086983]: Failed to call service /trajectory_by_name

Everything should be fine. the service package that I made is as exactly as was told. What is the reason a failure to call another service package ? That’s the first time I see this error message. Thanks in advance :pray:

The error message is :
[ERROR] [1672315485.215086983]: Failed to call service /trajectory_by_name
[service_client-3] process has died [pid 1198, exit code 1, cmd /home/user/catkin_ws/devel/lib/service_client_pkg/simple_service_client __name:=service_client __log:=/home/user/.ros/log/d335e8e0-8770-11ed-a832-0242ac1a0007/service_client-3.log].
log file: /home/user/.ros/log/d335e8e0-8770-11ed-a832-0242ac1a0007/service_client-3*.log

Actually the service executes just fine for 5 seconds and waits for its call and then this error shows up.
Why would a service client process die ? :thinking:

I am afraid I have changed by mistake the launch file of the trajectory_by_name service which is supposed to be called and not changed :face_with_peeking_eye:.

That maybe really the case, because later when I typed in the first shell :
roslaunch trajectory_by_name start_service.launch
and the service was launched fined waiting for it’s call , in the second shell I typed :
rosservice call /trajectory_by_name “traj_name: ‘’”
I got in the second shell the error :
ERROR: service [/trajectory_by_name] responded with an error: b"service cannot process request: service [/execute_trajectory] responded with an error: b’'"

Hi @mouidsakka01 ,

I believe the solutions are available for those exercises [from what I remember when I did the course].
You can look them up if you really get stuck at some exercise.


Hi @mouidsakka01 ,

You are getting this error because you did not fill out the command for traj_name. It is blank by default, you need to fill it with the name of the trajectory you want!


1 Like

Thank you for that information! that was something new for me. But the thing is : the service doesn’t wait for the call . The solution published misses that . It misses in the source code the line ;
ros::service::waitForService(“/trajectory_by_name”); // wait for service to be running
I hope you add that to the solution ! I just added it to my code and it works fine!

1 Like