Code Monkey home page Code Monkey logo

rust_zmqremoteapi's Introduction

example workflow

Rust zmqRemoteApi

A Rust ZeroMQ remote API for coppeliasim

to run tests

cargo test

to run an example: make sure to open the correct coppeliasim scene and run the cargo command:

cargo run --example=simple_test

Perhaps you want to see the zmq communication logs. There are two logs levels:

  • level 1: debug, debug level you will see the request in json format
  • level 2: trace, trace level you will see the request in json and bytes format
export RUST_LOG="trace"; cargo run --example=simple_test

Porting C++ client to Rust client

The RemoteAPIObjects.h has 3750 lines of code, so to port all the functions, I created a kind of c_transpiler.

diferences between C++ client and Rust client

At moment the only difference encountered is in

std::vector<uint8_t> getStringSignal(std::string signalName);

in rust the function returns a std::String. I haven't observed any examples where the function returns a block of bytes.

// Rust function assing 
get_string_signal(signal_name:String)->String

Get started

create a new rust project:

cargo new new_project

you can add this crate at your cargo.toml using git:

# the branch is the coppelia version
zmq_remote_api = { git = "https://github.com/samuel-cavalcanti/rust_zmqRemoteApi", branch = "CoppeliaSim_4.6.0"}

See a simple example to understand how to use this crate.

rust_zmqremoteapi's People

Contributors

samuel-cavalcanti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rust_zmqremoteapi's Issues

Web Assembly?

Is it possible to porting this version to web-assembly, and by web-socket to communicate with CoppeliaSim from browser?

Tasks for Coppeliasim 4.6

I must to do

  • #5
  • add an example and unit test for simIK
  • create sim_const.rs from json
  • add callback and register callback

Maybe I do

  • generate a docs.rs
  • put this crate in crate.io
  • [ ] support more plugins: simMujoco, simROS2, simVision

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.