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

Add support for services #1

Closed
adamdbrw opened this issue Aug 23, 2021 · 12 comments
Closed

Add support for services #1

adamdbrw opened this issue Aug 23, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@adamdbrw
Copy link
Member

No description provided.

@tank104
Copy link

tank104 commented Sep 12, 2022

I would like this (specifically for using MAVROS for mission planning).

Happy to help contribute (strong c# programmer), but I wouldn't know quite where to start..

@tank104
Copy link

tank104 commented Sep 12, 2022

(Just as FYI I have managed to work around this by sending Bash Commands from c# for "ros2 service call xxxx")

@adamdbrw
Copy link
Member Author

It seems that you are in luck, since we have a pull request #30 just recently submitted by @miyakoshi-dev. It will undergo a review process but of course you can give it a try at any time.

@tank104
Copy link

tank104 commented Sep 13, 2022

Oh wow what timing! Thats great - I will try and test out this week.

@tank104
Copy link

tank104 commented Sep 13, 2022

Just trying to work on this now. @miyakoshi-dev do we import service messages somehow as part of the build for this?

@miyakoshi-dev
Copy link
Contributor

miyakoshi-dev commented Sep 14, 2022

@tank104
I have added and tested a new service message in my local environment, but in this PR I have not included that service message.
Since you modified ros2_galactic.repos, running <get_repos.sh> should install the example_interfaces.
You can check the service functionality in this PR by running client/service added to ros2cs_examples using example_interfaces.

@tank104
Copy link

tank104 commented Sep 14, 2022

@miyakoshi-dev I am going to test with mavros service - will let you know how I go.

Some core files have reference to example_interfaces (I have commented in PR). Is this by design?
I am having build issues with it

@tank104
Copy link

tank104 commented Sep 14, 2022

With the change to core, I still get the following error building:
/home/andrew/ros2cs/src/ros2cs/ros2cs_examples/ROS2Client.cs(21,7): error CS0246: The type or namespace name 'example_interfaces' could not be found (are you missing a using directive or an assembly reference?) [/home/andrew/ros2cs/build/ros2cs_examples/ros2cs_client/ros2cs_client_dotnetcore.csproj]

I can see example_interfaces in src, and it looks to have built successfully in logs too..

(Also not sure what you mean Since you modified ros2_galactic.repos, I didn't modify that file, and all repo are up to latest)

@tank104
Copy link

tank104 commented Sep 14, 2022

Apologies for potentially taking this thread slightly offtopic - but after trial and error I found that I needed to change the CMakeList.txt and hardcode example_interfaces_ASSEMBLIES_DLL as per below.

I can't figure out where example_interfaces_ASSEMBLIES_DLL should be set, and why it isn't. Any pointers on this?


set(_assemblies_dep_dlls
     ${ros2cs_common_ASSEMBLIES_DLL}
     ${ros2cs_core_ASSEMBLIES_DLL}
     ${std_msgs_ASSEMBLIES_DLL}
     ${sensor_msgs_ASSEMBLIES_DLL}
     ${builtin_interfaces_ASSEMBLIES_DLL}
#    ${example_interfaces_ASSEMBLIES_DLL}
    "/home/andrew/ros2cs/install/lib/dotnet/example_interfaces_assembly.dll"
)

@miyakoshi-dev
Copy link
Contributor

miyakoshi-dev commented Sep 14, 2022

I used example_interfaces to implement my service.
I have confirmed that the build can be done normally with the following procedure. (Limited to galactic)
If it seems that it is built in a different procedure, could you try it with the procedure shown?

git clone https://github.com/miyakoshi-dev/ros2cs.git
cd ros2cs
git checkout service
source ../galactic/install/local_setup.bash ★galactic path
./get_repos.sh
./build.sh

@tank104
Copy link

tank104 commented Sep 14, 2022

@miyakoshi-dev yup that is what I have done. I don't think its your code though, I think its something in my setup, but I cannot figure out what.

It seems to be example_interfaces_ASSEMBLIES_DLL isn't evaluating, but I don't know where/how its supposed to be setup

@pijaro
Copy link
Collaborator

pijaro commented Jan 26, 2023

Implemented in #36

@pijaro pijaro closed this as completed Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants