Skip to content

Commit

Permalink
Update writing_a_simple_publisher_and_subscriber.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Guelakais authored Jun 25, 2024
1 parent 8b1a3e8 commit dfa6b4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/writing_a_simple_publisher_and_subscriber.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ from building packages for [Python](https://docs.ros.org/en/humble/Tutorials/Beg
First, you'll need to go and create into a standard [cargo](https://doc.rust-lang.org/cargo/)
project as follows:
```
cargo new rust_pub_sub && cd rust_pub_sub
cargo new rust_pubsub && cd rust_pubsub
```
In the [`Cargo.toml`](https://doc.rust-lang.org/book/ch01-03-hello-cargo.html) file, add a dependency on `rclrs = "*"` and `std_msgs = "*"` by editing this file. Your `Cargo.toml` could now look like this:
```toml
[package]
name = "rust_pub_sub"
name = "rust_pubsub"
version = "0.1.0"
edition = "2021"

Expand All @@ -63,7 +63,7 @@ std_msgs = "*"
Additionally, create a new `package.xml` if you want your node to be buildable with [`colcon`](https://colcon.readthedocs.io/en/released/user/installation.html). Make sure to change the build type to `ament_cargo` and to include the two packages mentioned above in the dependencies, as such:
```xml
<package format="3">
<name>rust_pub_sub</name>
<name>rust_pubsub</name>
<version>0.0.0</version>
<description>TODO: Package description.</description>
<maintainer email="user@todo.todo">user</maintainer>
Expand Down

0 comments on commit dfa6b4c

Please sign in to comment.