Skip to content

use local rosrust #8

Closed
Closed
@lucasw

Description

@lucasw

Need to have dependencies like this

[dependencies]
# rosrust = "0.9.5"
# rosrust_msg = "0.1.1"
rosrust = { path = "../../../../rosrust/rosrust" }
rosrust_msg = { path = "../../../../rosrust/rosrust_msg" }

It's not possible to point at just the top level rosrust directory, the individual packages need to be called out (or for that to work it has to be called out differently, how to distinguish between rosrust at the top level and the Cargo.toml one level down also called rosrust?).

Also, rosrust_msg depends on rosrust, but it doesn't take the one specified above, this results in an error

error[E0277]: the trait bound `rosrust_msg::rosgraph_msgs::Log: rosrust::Message` is not satisfied
  --> src/loginfo/main.rs:8:5
   |
8  |     rosout_pub: ros::Publisher<Log>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rosrust::Message` is not implemented for `rosrust_msg::rosgraph_msgs::Log`
   | 
  ::: /home/lucasw/own/src/rust/rosrust/rosrust/src/api/raii.rs:14:25
   |
14 | pub struct Publisher<T: Message> {
   |                         ------- required by this bound in `rosrust::Publisher`

error[E0277]: the trait bound `rosrust_msg::std_msgs::Float32: rosrust::Message` is not satisfied
  --> src/loginfo/main.rs:9:5
   |
9  |     float_pub: ros::Publisher<Float32>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `rosrust::Message` is not implemented for `rosrust_msg::std_msgs::Float32`
   | 
  ::: /home/lucasw/own/src/rust/rosrust/rosrust/src/api/raii.rs:14:25
   |
14 | pub struct Publisher<T: Message> {
   |                         ------- required by this bound in `rosrust::Publisher`

error: aborting due to 2 previous errors

So have to fix the rosrust_msg dependency to depend on the local rosrust:

[dependencies]
# rosrust = "0.9.5"
rosrust = { path = "../rosrust" }

PR for above here adnanademovic/rosrust#153

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions