Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: 'void ros::ServiceClient<MReq, MRes>::call(const MReq&, MRes&) [with MReq = rosserial_arduino::TestRequest; MRes = rosserial_arduino::TestResponse]' marked 'override', but does not override virtual void call(const MReq & request, MRes & response) override #597

Open
anferjo opened this issue Jul 29, 2022 · 3 comments

Comments

@anferjo
Copy link

anferjo commented Jul 29, 2022

Hi guys I'm having some problems with the ServiceClient example from the Arduino roslib library, once I try to compile it I get the next error message:

In file included from /home/user/Arduino/libraries/ros_lib/ros/node_handle.h:62:0,
from /home/user/Arduino/libraries/ros_lib/ros.h:38,
from /home/user/Arduino/libraries/ros_lib/examples/ServiceClient/ServiceClient.pde:5 :

/home/user/Arduino/libraries/ros_lib/ros/service_client.h: In instantiation of 'class ros::ServiceClient<rosserial_arduino::TestRequest, rosserial_arduino::TestResponse>':
/home/user/Arduino/libraries/ros_lib/examples/ServiceClient/ServiceClient.pde:12:57: required from here
/home/user/Arduino/libraries/ros_lib/ros/service_client.h:57:16: error: 'void ros::ServiceClient<MReq, MRes>::call(const MReq&, MRes&) [with MReq = rosserial_arduino::TestRequest; MRes = rosserial_arduino::TestResponse]' marked 'override', but does not override
virtual void call(const MReq & request, MRes & response) override
^~~~
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

I'm not sure if this is a problem related to Arduino or with roslib. I generate the lib as it says in the rosserial Arduino tutorial ide setup
( http://wiki.ros.org/rosserial_arduino/Tutorials/Arduino%20IDE%20Setup ) with the next command:

rosrun rosserial_arduino make_libraries.py .

what I'm trying to do is create a client with my own service but I can't even run the client example. Thanks in advance for your cooperation.

@sozgundemir
Copy link

I am having the same issue. Were you able to find any solution?

@octo-vaibhav
Copy link

I have also faced the same issue. After surfing through internet, i came to know that, client in rosserial_arduino has different process to build. following link will help you to create client for arduino.
link: http://wiki.ros.org/rosserial_client/Tutorials
(PS; I have not tried the tutorial given in the link.)
I will update the result, if i happen to try the tutorial.

@Aistark-web
Copy link

This is a source code writing error. Because the base class does not have the call function, using override is incorrect
Modify the content of the header file service_client. h and compile successfully.
Before modification:
virtual void call(const MReq & request, MRes & response) override
Remove the override keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants