Skip to content

Commit

Permalink
feat!: Use the node's namespace for ROS communication
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-caspers committed Oct 7, 2024
1 parent 1e284fc commit 74e7126
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/register_subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ pub fn register_opcua_subscriptions(ros_node: Arc<Node>, opc_ua_client: Arc<Mute
let tcp_pose_buffer_copy_quaternion = Arc::clone(&tcp_pose_buffer);

let tcp_twist_publisher: Arc<Mutex<RosPublisher<TwistStamped>>> = Arc::new(Mutex::new(
RosPublisher::new(&ros_node, "tcp_twist").unwrap(),
RosPublisher::new(&ros_node, "~/tcp_twist").unwrap(),
));
let tcp_wrench_publisher: Arc<Mutex<RosPublisher<WrenchStamped>>> = Arc::new(Mutex::new(
RosPublisher::new(&ros_node, "tcp_wrench").unwrap(),
RosPublisher::new(&ros_node, "~/tcp_wrench").unwrap(),
));

opc_ua_client
Expand Down
4 changes: 2 additions & 2 deletions src/ros_publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl JointStatesBuffer {
current_velocities: Arc::new(Mutex::new(vec![0.0; 6])),
current_efforts: Arc::new(Mutex::new(vec![0.0; 6])),
publisher: Arc::new(Mutex::new(
RosPublisher::new(&ros_node, "joint_states").unwrap(),
RosPublisher::new(&ros_node, "~/joint_states").unwrap(),
)),
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ impl TCPPoseBuffer {
current_pose: Arc::new(Mutex::new(vec![0.0; 6])),
current_quaternions: Arc::new(Mutex::new(vec![0.0; 4])),
publisher: Arc::new(Mutex::new(
RosPublisher::new(&ros_node, "tcp_pose").unwrap(),
RosPublisher::new(&ros_node, "~/tcp_pose").unwrap(),
)),
}
}
Expand Down

0 comments on commit 74e7126

Please sign in to comment.