Skip to content

Commit

Permalink
Continuing to reorg and cleanup, reducing internal message generation
Browse files Browse the repository at this point in the history
  • Loading branch information
carter committed Jan 6, 2025
1 parent 970857d commit 52cd5d9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions roslibrust_ros1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ thiserror = "2.0"
anyhow = "1.0"

[dev-dependencies]
# Used to provide message types for the examples
# TODO generate a roslibrust_std_msgs crate we can depend on instead of this
roslibrust_codegen_macro = { path = "../roslibrust_codegen_macro" }
# Relied on by generate types in the macro this should be cleaned up
roslibrust_codegen = { path = "../roslibrust_codegen" }
# Used for message definitions in tests
roslibrust_test = { path = "../roslibrust_test" }

[features]
# Used for enabling tests that rely on a running ros1 master
Expand Down
2 changes: 1 addition & 1 deletion roslibrust_ros1/src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use tokio::{

use super::actor::NodeServerHandle;

/// The regular Publisher representation returned by calling advertise on a [crate::ros1::NodeHandle].
/// The regular Publisher representation returned by calling advertise on a [crate::NodeHandle].
pub struct Publisher<T> {
// Name of the topic this publisher is publishing on
topic_name: String,
Expand Down
2 changes: 1 addition & 1 deletion roslibrust_ros1/tests/ros1_xmlrpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
mod tests {
use roslibrust_common::RosMessageType;
use roslibrust_ros1::NodeHandle;
use roslibrust_test::ros1::*;
use serde::de::DeserializeOwned;
use serde_xmlrpc::Value;
roslibrust_codegen_macro::find_and_generate_ros_messages!("assets/ros1_common_interfaces");

async fn call_node_api_raw(uri: &str, endpoint: &str, args: Vec<Value>) -> String {
let client = reqwest::Client::new();
Expand Down
2 changes: 1 addition & 1 deletion roslibrust_rosapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ impl<T: ServiceProvider + Send + Sync> RosApi for T {
#[cfg(feature = "ros1_test")]
mod test {
use super::RosApi;
use roslibrust_rosbridge::{ClientHandle, ClientHandleOptions};
use roslibrust::rosbridge::{ClientHandle, ClientHandleOptions};

async fn fixture_client() -> ClientHandle {
// Tiny sleep to throttle rate at which tests are run to try to make CI more consistent
Expand Down
10 changes: 2 additions & 8 deletions roslibrust_rosbridge/src/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,10 @@ mod integration_tests {
const LOCAL_WS: &str = "ws://localhost:9090";

#[cfg(feature = "ros1_test")]
roslibrust_codegen_macro::find_and_generate_ros_messages!(
"assets/ros1_common_interfaces/ros_comm_msgs",
"assets/ros1_common_interfaces/std_msgs",
);
use roslibrust_test::ros1::*;

#[cfg(feature = "ros2_test")]
roslibrust_codegen_macro::find_and_generate_ros_messages!(
"assets/ros2_common_interfaces/std_msgs",
"assets/ros2_common_interfaces/std_srvs"
);
use roslibrust_test::ros2::*;
// This replaces the fact that Time.msg is no longer in std_msgs in ROS2
#[cfg(feature = "ros2_test")]
use roslibrust_codegen::integral_types::Time;
Expand Down

0 comments on commit 52cd5d9

Please sign in to comment.