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

Using srv inside rorust code #206

Open
Akumar201 opened this issue Aug 23, 2024 · 0 comments
Open

Using srv inside rorust code #206

Akumar201 opened this issue Aug 23, 2024 · 0 comments

Comments

@Akumar201
Copy link

Akumar201 commented Aug 23, 2024

Hello, I am a new to rust and would like to use the given folder srv files inside my code, I am not sure about that till now what I have been trying to do is copy the folder ,

my_rust_project/
├── Cargo.toml
├── src/
│ ├── main.rs
└── ros_srv/
├── SetAxis.srv
├── SetInt16.srv
├── Move.srv
└── GetFloat32List.srv

And trying to write code like

    mod msg {
    // Adjust package and service names to match your `.srv` files
    rosrust::rosmsg_include!(
        xarm_msgs / SetAxis,
        xarm_msgs / SetInt16,
        xarm_msgs / Move,
        xarm_msgs / GetFloat32List
    );
}

but getting this error

    rosrust::client::<msg::xarm_msgs::GetFloat32List>("/xarm/get_position_rpy").unwrap();
    |                                    ^^^^^^^^^ could not find `xarm_msgs` in `msg`
    

Is there a specific way to achieve this like having a catkin_ws and build it or I can do it using simple cargo build , any help would be much appreciated.

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

1 participant