Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
motii8128 authored Jan 18, 2024
1 parent bf37e79 commit c3e0c1a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ async-std = "1.0"
zenoh = "0.7.0-rc"

keyboard_publisher = {git = "https://github.com/PureRustRobot/keyboard_publisher.git"}
command_controller = {git = "https://github.com/PureRustRobot/command_controller.git"}
command_controller = {git = "https://github.com/PureRustRobot/command_controller.git"}
motor_controller = {git = "https://github.com/PureRustRobot/motor_controller"}
serial_transporter = {git = "https://github.com/PureRustRobot/serial_transporter"}
27 changes: 23 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,35 @@ use async_std;
use zenoh::Error;

use keyboard_publisher::wasd_controller;
use command_controller::wheel_controller;
use motor_controller::cmd_vel_to_wheel;
use serial_transporter::serial_transporter;

#[async_std::main]
async fn main()->Result<(), Error>
{
let key_task = async_std::task::spawn(wasd_controller("keyboard_publisher", "./param/config.yaml"));
let get_command_task = async_std::task::spawn(wheel_controller("wheel_cmd_publisher", "./param/config.yaml"));
let key_task = async_std::task::spawn(wasd_controller(
"keyboard_publisher",
"cmd_vel",
1.0)
);

let wheel_task = async_std::task::spawn(cmd_vel_to_wheel(
"cmd_to_wheel",
"cmd_vel",
"cmd/wheel",
1.0)
);

let serial_task = async_std::task::spawn(serial_transporter(
"wheel_serial",
"cmd/wheel",
"/dev/ttyACM0",
115200)
);

key_task.await?;
get_command_task.await?;
wheel_task.await?;
serial_task.await?;

Ok(())
}

0 comments on commit c3e0c1a

Please sign in to comment.