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

Building with ros_comm in catkin_ws fails on test_rosmaster::String #151

Open
lucasw opened this issue Nov 3, 2020 · 1 comment
Open

Comments

@lucasw
Copy link
Contributor

lucasw commented Nov 3, 2020

When I have ros_comm in my catkin_ws building with rosrust fails with:

...
  |       function or associated item `new` not found for this
  |       function or associated item not found in `test_rosmaster::String`
  |
  = help: items from traits can only be used if the trait is implemented and in scope
  = note: the following traits define an item `new`, perhaps you need to implement one of them:
          candidate #1: `error_chain::ChainedError`
          candidate #2: `gimli::read::lookup::PubStuffEntry`
          candidate #3: `aho_corasick::Transitions`
          candidate #4: `rand::distributions::uniform::UniformSampler`
          candidate #5: `error_chain::ChainedError`

test_rosmaster::String is built by ros_comm by default in devel, it doesn't get installed.

This docker command replicates it:

docker run --rm -it ros:noetic-robot bash -c "\
apt update && \
apt install -y curl git && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
source /root/.cargo/env && \
source /opt/ros/noetic/setup.bash && \
mkdir catkin_ws/src -p && \
cd catkin_ws/src && \
git clone https://github.com/ros/ros_comm.git && \
cd .. && \
catkin build && \
source devel/setup.bash && \
cd .. && \
git clone https://github.com/adnanademovic/rosrust.git && \
cd rosrust && \
cargo build"

I've tried a few variations on not building the test_rosmaster messages at all but it's odd because the generated rosrust::rosmsg_include!(... ends up including them anyway and fails the same way. It even finds messages completely outside of the sourced workspace in a separate development workspace (but within my $HOME), rosmsg list won't show the messages as expected but rosrust_msg still finds them. Using a catkin install process didn't help. I can document that better in a separate issue with docker commands to reproduce.

This looks similar to #134

I've got additional less organized notes here lucasw/rust_test#1

@jobafr
Copy link

jobafr commented Sep 12, 2023

I can confirm this.

lucasw added a commit to lucasw/rosrust that referenced this issue Mar 7, 2024
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