Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [service]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Spawner Waiting for '/controller_manager' services to be available

when I run one of my launch files that calls this launch file I got this error: ...
Andrea Salcedo's user avatar
0 votes
0 answers
6 views

Ros1 topic_tools::ShapeShifter for Service callbacks?

I am working in ros melodic and I have a node that creates a ros::ServiceServer and binds it to a service callback. I want this service callback to be generic since I would always access the same ...
xaruvi13's user avatar
1 vote
0 answers
12 views

add_two_ints_client() doesn't stop blocking

I am following this ROS tutorial to create a server and client: https://wiki.ros.org/ROS/Tutorials/WritingServiceClient%28python%29. However, when I run the code, I get this: ...
can567's user avatar
  • 11
0 votes
1 answer
48 views

ROS2 Send Image Through Service (C++)

I'm relatively new to ROS2 and have been relying on tutorials and online resources to navigate my learning journey. Currently, I'm trying to send an image via a service request, but despite my efforts,...
Heron Saba's user avatar
0 votes
1 answer
47 views

Failed to set parameters using the service /turtlesim/set_parameters of the SetParameters type

I tried to use the service /turtlesim/set_parameters [rcl_interfaces/srv/SetParameters] to set the background of the turtlesim ...
Yongxue Law's user avatar
0 votes
0 answers
13 views

I "successfully" killed a turtle that does not exsit in the first place, how to fix this?

I have written the following code to kill a turtle using the service "/kill". When I first run the C++ exeucatable, I successfully killed it. But when I run the code again, I "...
Yongxue Law's user avatar
0 votes
0 answers
5 views

LOCALAPPDATA not found in mavproxy.py

I have the following file /home/pi/mavproxy.sh which forwards the flight controller telemetry data using mavproxy to GCS(Ground Control Station) ...
Mubashir's user avatar
0 votes
0 answers
4 views

is there a gazebo or ros2 service/action to call SetActive from sensor?

context: I have a simulation with a drone that have a camera. It is always "on" and i'd like to turn it "on" on demand only (from command line in a first step, then from a ros2 ...
SebL's user avatar
  • 51
1 vote
3 answers
121 views

Get the name of the node calling a service in the service callback

In rclpy (python), I'm creating a service. How can this service tell the name of the node that is calling it? My goal is to allow the service to check the node-name of the client before performing the ...
Sorawit Inprom's user avatar
0 votes
2 answers
117 views

Multiple servers in a single node [ROS2]

I am trying to make two servers for two different services in a single node. For example, like so: ...
Suchetan Saravanan's user avatar
1 vote
0 answers
83 views

ROS2 C++ Generic Action / Service Client

I’m trying to make a generic C++ application for controlling ROS robots. The idea is to allow design of GUIs in a higher-level language (QML) without requiring modifying the C++ when integrating new ...
yunhui yang's user avatar
1 vote
1 answer
23 views

How to run ROS code using Service File

I have two service files that are running ros code . When I start my system the service file B complains about not able to look for the robot model, then when I stop both service files and start ...
Ankit Kumar's user avatar
1 vote
0 answers
403 views

spin_until_future_complete in an already spinning node

I’m making a program, this program has a rclcpp::node and is running with several threads. In the main thread I have executor.add_node(node); executor.spin(); this ...
Donca's user avatar
  • 11
0 votes
1 answer
54 views

How to share a service among packages?

I have the following ROS workspace structure: ...
Donca's user avatar
  • 11
1 vote
0 answers
188 views

ROS2 Humble service call within a timer callback

I have a system in which there are 2 component nodes in a single process. Both of them have a dedicated single-threaded executor (2 separate node containers). The first node needs to make a service ...
Vladimir Kostic's user avatar
1 vote
0 answers
43 views

ROS2 FastRTPS services become unresponsive after a while

I am using ROS2 humble on Ubuntu 22.04 binary build, my current RMW implementation is the default for humble which is FastRTPS. The problem I am facing now is that any ros service I have in Python or ...
ammar albakri's user avatar
0 votes
1 answer
51 views

Model bounces when calling the "reset_world" service in gazebo

Hi, I am trying to reset a model to it's original position but when I call the "/reset_world" service (without a large time delay with time.sleep) the model bounces in the air. Any help to ...
user avatar
0 votes
1 answer
100 views

Service call from python hangs

Hi, I am trying to call an existing service (/reinitialise_global_localization from AMCL). I tried creating a client node, but the client gets to request and hangs. I am not sure what is wrong. The ...
user avatar
0 votes
1 answer
4 views

Service Server and Publisher using same Node

So what i wanted to do is, send a service call to this service and then i wanted this service to publish to another topic. So i was experimenting this with the code as follows. But ofcourse lots of ...
user avatar
0 votes
1 answer
46 views

ROS2 Following basic service/client tutorial, executables doesn't seems to install

For a bit of context, I am using Ubuntu 20.04 with ROS2 Foxy. I followed this tutorial : https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Service-And-Client.html To ...
user avatar
0 votes
1 answer
7 views

How to have random number every node run

Im using this rand() function on my code. When I first run the node, it gives me random number, but when I run the node again, it gives me the previous random number. I applied this code on turtlesim/...
user avatar
0 votes
1 answer
23 views

ROS Service (client inside server node)

Is it possible to put a client node inside a server node when making service? Iam trying to make a Service and as far as I know, all the functions are stored in the server node and inside the client ...
user avatar
0 votes
1 answer
15 views

Gazebo services call [/shadow_caster_material_name] and [/shadow_caster_render_back_faces] time-out, making Gazebo and ROS launchers unusable

Setup: Ubuntu 20.04, ROS 2 Galactic, Gazebo (11.10.1-1~focal) With the update to the gazebo11 (ver 11.10.1) in the last ROS 2 Galactic sync my launch files and Gazebo overall stopped working correctly ...
ljaniec's user avatar
  • 1,563
0 votes
2 answers
4 views

Service called by many nodes at the same time

I have a service that returns available stations for robots when their batteries are low. The station is 'busy' if there was already a robot in there or there is a robot is going to that station. ...
user avatar
0 votes
1 answer
49 views

Calling Service from Node does not work, but calling it from CLI works

I want to make an interface for controlling many of my nodes. One function of this node is to set the lifecycle state of the map server provided by the navigation2 package. To do so, I run the ...
user avatar
0 votes
3 answers
92 views

Call a service from a launch.py file in ROS2

Question Is there any possibility to call a service from a launch.py file in ROS2? Details I have written a python node with a service which is launched by a launch.py file. Within the same launch ...
user avatar
0 votes
1 answer
8 views

How to send rosservice call message from a c++ package?

Hello all, I am writing a package written in c++ for ros-melodic on ubuntu 18.04. I need to send service call to a node that takes 3 values as following service call from terminal to change LED color. ...
user avatar
0 votes
1 answer
3 views

Ros service not advertised in functions

Followed the tutorial, adapted it to my project. When I call the advertiseService in the main, it works. When it is called in a function called by main, it doesn't. Here some code. First, tutorial ...
user avatar
0 votes
1 answer
11 views

action server, service server, or publisher/subscriber. Which one should I use?

Hi, I have a question, before question I will explain my case.In my case, there are 2 sides which one of them is simulation and other one is calculator, I need to execute this scenario: Simulation ...
user avatar
0 votes
1 answer
3 views

Where can I get a program for "service call"?

I used a command as below. ros2 service call /set_message hello_world_msgs/srv/SetMessage \ '{message: "Hello service!"}' I'd like to know how this program works. But I couldn't find a ...
user avatar
0 votes
1 answer
5 views

Getting error after calling a service in eloquent

Hi! I`m trying to use a Rtabmap service, which is defined as follows: #request bool global bool optimized bool graph_only --- #response Then, I call: ...
user avatar
0 votes
1 answer
30 views

ROS service with bool as request and bool as response

I don't want to use std_srvs::SetBoolRequest or any stuff from mavros. I just want to use bare boolean. My callback function would be : ...
user avatar
0 votes
1 answer
15 views

Error when running a C++ service node using a custom srv in ROS2

I'm trying to follow these two tutorials to create a node that provides a ROS2 service using a custom .srv: https://index.ros.org/doc/ros2/Tutorials/Custom-ROS2-Interfaces/ https://index.ros.org/doc/...
user avatar
0 votes
2 answers
312 views

How to call spin_some or spin_until_future_complete in member functions

Hi together, my coding style of ROS2 is to put all stuff into an object and member functions. Now I wonder how to use spin_some or spin_until_future_complete inside a member function of my object? I ...
user avatar
0 votes
1 answer
13 views

service on different namespace

Hey guys Quick question: I was wondering if it's possible to call services that are created on nodes with different namespaces? For instance, if I have node_1 on namespace node_1, can I call service_2 ...
user avatar
0 votes
1 answer
5 views

Importing a service in python defined by others

I am stuck in something that should be pretty easy... I have a service called "set_odometry", which I can use doing rosservice from the bash. This service is installed from apt-get so I don'...
user avatar
0 votes
1 answer
1 view

How to implement service using oops concept?

Hey all, I need to implement a service. I can do it using two separate functions or classes each for service server and client server. But my idea is to implement both service server and service ...
user avatar
0 votes
1 answer
7 views

Problem with str in service client

I am writing a service and this is the message : std_msgs/String pose --- sensor_msgs/JointState finalpos This is the client : ...
user avatar
0 votes
1 answer
25 views

catkin_make do not create header files for srv files!

https://www.youtube.com/watch?v=dxVQnWhDgfg I tried this tutorial. This tutorial is about creating srv files. I did everything like tutorial showed me. But in 4:14 tutorial says "you can verify ...
user avatar
0 votes
2 answers
19 views

Is it possible to have a Subscriber inside the Service Server

Hello, I want to create a ROS service which will perform the docking based on the IR sensors. But for that I need a consistent feedback from IR receivers to navigate, so another words I have to have ...
user avatar
0 votes
1 answer
7 views

Call service from specific node

Scenario: System of multiple nodes able to be configured during runtime via one master. Idea: every node provides a service (ex: configure_node(config)) which can be called by the master. Each node is ...
user avatar
0 votes
1 answer
6 views

CLion doesn't see header generated by service

I have a fresh install of all - Ubuntu, CLion and ROS Melodic, and I am having troubles with how CLion handles the headers I have a package called maze_controller, which contains a custom service and ...
user avatar
0 votes
1 answer
50 views

Ros 2 remap services

Hello, Is there (already) a way in Ros 2 to remap services in a launch file? For example: If my service is on '/service' and my client-node is in a namespace called 'a' and therefore tries to connect ...
user avatar
0 votes
1 answer
8 views

ROS2 client connecting to the same server fails after restarting the executable

ROS Version: ROS2 Ardent Platform: x86_64 Ubuntu 16.04 LTS, 4.15.0-48-generic Hello! I'm creating a system with a rclcpp::Node instance that monitors and controls rclcpp_lifecycle::LifecycleNode or ...
user avatar
0 votes
2 answers
21 views

ROS2 Services in Python

Hello, I have been looking everywhere for documentation on how to add .srv files to a workspace when using the Python build system for ROS2. I assume something needs to go in the setup.py (as well as ...
user avatar
0 votes
1 answer
9 views

ROS2 Crystal member service linking rosidl_typesupport_cpp

Hi everyone, I have a problem including services in ROS2 crystal packages. If I try to add and generate a custom service and use std service "Trigger", I get a rosidl linking error: Error ...
user avatar
0 votes
1 answer
6 views

roslib.message.get_message_class returns None

I'm trying to create a tool that can dynamicly read service call descriptions from a yaml file and call the services accordingly. (in rospy on kinetic) If i try to resolve a non-standard service type ...
user avatar
0 votes
1 answer
9 views

Problem declaring a service server within a class

Hi everyone, I am a beginner in c++ especially with classes, I am trying to declare a service server within a class but it doesn't work, I have already had the same problem declaring a subscriber ...
user avatar
0 votes
1 answer
146 views

Ros 2 command line service call with array of custom msg

Hi, I'm using ROS 2 Bouncy on Ubuntu 18 and I'm trying to call a service from command line. I can't seem to formulate a good srv while using the command line and get an error : ...
user avatar
0 votes
1 answer
28 views

genpy.message.SerializationError when calling service /gazebo/set_model_configuration

Hi, I want to implement a node, that calculates random values for the joints of my robot and publishes them. Furthermore, I want to call the service ...
user avatar

1
2 3 4 5