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

Example will not compile: Could not find std_msgs in rosrust_msg #192

Open
dannyhammer opened this issue Apr 8, 2023 · 1 comment
Open

Comments

@dannyhammer
Copy link

When attempting to run the following example: https://github.com/adnanademovic/rosrust/blob/master/examples/examples/publisher_node.rs

I receive the following error:

error[E0433]: failed to resolve: could not find `std_msgs` in `rosrust_msg`
  --> src/main.rs:51:32
   |
51 |         let msg = rosrust_msg::std_msgs::String {
   |                                ^^^^^^^^ could not find `std_msgs` in `rosrust_msg`

For more information about this error, try `rustc --explain E0433`.

Versions:

[dependencies]
env_logger = "0.10.0"
rosrust = "0.9.11"
rosrust_msg = "0.1.7"

Granted, I may be missing something that should be completely obvious, but I'm unsure as to why the example file will not compile.

@adnanademovic
Copy link
Owner

You need to have ROS installed, and have it sourced in whatever environment you run it in. Alternatively you can use the ROSRUST_MSG_PATH environment variable to point towards the location where you store the msg files without needing to install ROS on the particular machine.

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

2 participants