Questions tagged [service]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
40 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
15 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
90 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
48 views

How to share a service among packages?

I have the following ROS workspace structure: ...
Donca's user avatar
  • 11
1 vote
0 answers
64 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
32 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
20 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
30 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
3 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
11 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
3 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
7 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
3 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,553
0 votes
2 answers
1 view

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
8 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
2 answers
32 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
3 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
1 view

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
2 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
2 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
2 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
2 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
6 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
81 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
2 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
3 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
1 view

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
7 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
5 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
3 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
3 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
16 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
4 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
6 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
1 view

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
2 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
5 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
53 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
12 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
0 votes
2 answers
25 views

service response empty

The wiki doesn't make it clear if response or request of a ROS service can be empty, and what will happen when either is empty. I have seen rospy.Service fails if ...
user avatar
0 votes
1 answer
24 views

ROS2 error creating a service server as a member function?

I am trying to create a service server with a callback as a member function: ...
user avatar
0 votes
1 answer
2 views

How to send a vector with Service Client Communication?

Hi How can I send a hole vector in once(not one by one of each entries) from client to the service ? is it possible? Thanks Originally posted by Developer on ROS Answers with karma: 69 on 2018-06-05 ...
user avatar
0 votes
1 answer
2 views

Interactive Service Server

For actions, there is the very convenient axserver.py node in the actionlib package that provides a simply GUI for an interactive action server. Is there something ...
user avatar
0 votes
1 answer
2 views

How are service.h files are generated from service.srv files?

Using Sevices in ROS, we create a service definition file in the srv folder and name it as service.srv and when we include this ...
user avatar
0 votes
1 answer
2 views

Calling a (Gazebo) service parallelly from multiple nodes/ Remapping a (Gazebo) service to a particular namespace

I have a multi robot setting (with different namespaces which work totally independent of each other, in the same empty_world) in Gazebo. I have to reset the manipulated objects after a certain time ...
user avatar
0 votes
1 answer
4 views

Why do we need to add generators for messages, services and actions, but only generate messages (in the CMakeLists.txt file)?

In the following article http://wiki.ros.org/catkin/CMakeLists.txt#Overall_Structure_and_Ordering, it is stated that, for a package to be correctly built, we must follow a certain format for the ...
user avatar
0 votes
1 answer
2 views

No response from service, node won't close either

I am running into an issue with calling a service in the callback function of a listener. I couldn't find a way to call the service as the initialization of the client stood in the main, but moving ...
user avatar
0 votes
1 answer
7 views

no matching function for call to

Hey everybody, I'm working on a node that uses a service to repeat a string a variable amount of times. for this i made the following srv file: ...
user avatar
0 votes
1 answer
2 views

Calling a third party service on a client

I'm trying to write a service client in python to enable_motors of hector_quadrotor. I would like to turn on engine on my code ...
user avatar