Comments (6)
Great! It works fine, with a small patch.
Code is here, (actually it is not tutorial, just an example..)
https://github.com/OTL/rosrust_tutorial
And I opened a pull request to fix the problem that happend in my environment.
I understand your situation very well. You don't have to be harry up, and don't have to feel any pressure.
Thank you for excellent ROS/Rust experience!
from rosrust.
What's the topic of?
There is currently an issue in the rustc_serialize
methods that I've resolved in my switch to serde
. But that's in the works currently, and should be finished hopefully soon
from rosrust.
Hi,
I want to know, is it time to try your new code now?
BTW, I'll talk about your project, rosrust, in the ROS JAPAN USERS MEETING, May 20th, Tokyo.
I'm happy if I can introduce about your great software!
from rosrust.
I've been quite busy, so the development was slow. But I merged the major changes into master, and I'll do my best to push a new release on Saturday. I'll also create another repo with a small demo project. It can't be just an example, since it requires build scripts.
In the master branch, rosrust
doesn't need any message generation. If you want to try out master:
Create a build.rs
in the root folder of your project (not the src/
), and in it:
#[macro_use]
extern crate rosrust;
rosmsg_main!("std_msgs/String","sensor_msgs/Imu");
You just list all the messages you need. Then in your main.rs
, you add:
#[macro_use]
extern crate rosrust;
rosmsg_include!();
After that, the rest is pretty much the same. You could create an IMU message with msg::sensor_msgs::Imu::new()
, and the rest of the API should work as before
For all of this to currently work, you need to depend on the master branch rosrust
, and depend on the newest serde
and serde_derive
.
Also, the echo you tried should work now, but I can't guarantee anything until I do more tests this weekend. I wrote all of this assuming you're eager to test things.
from rosrust.
Already patched in 👍
I use std::string::String
in so many places in the message generation, funny that I missed using it there, and it never failed!
I'll make sure to mention your example code in the README when I'm prepping the next release this weekend.
I'll close the issue as soon as I test some things myself too.
from rosrust.
Added one more fix, and now the 0.5 version is released on crates.io!
Btw, your demo app could make good use of the env_logger
crate.
extern crate env_logger;
fn main() {
env_logger::init().unwrap()
// rest of the code
}
This is all you need to do. And in the homepage of the env_logger
doc you can see different logging levels. The reason I'm mentioning it is the fact that sometimes two nodes just won't connect, and you'd get an error message only if you have a logger. Those errors happen in different threads, and are caused by bad network connection attempts (somebody trying to connect to a sensor_msgs/Imu
publisher with an geometry_msgs/Twist
subscriber).
But, as the crate is far from finished, it would be good to see whenever errors happen, because it's more than likely that they can be caused by some undocumented edge cases in the ROS communication protocols, and you could report that kinda issues here then! :)
Have fun coding!
And thanks for the help!
from rosrust.
Related Issues (20)
- error: proc macro panicked HOT 2
- Use rosrust to connect on other machine
- rosrust_msg takes a lot of time on each cargo build while messages definitions have not changed HOT 1
- Derive Serde's Serialize and Deserialize for the generated message structs HOT 1
- Publish data to different computer HOT 1
- Upgrade nix to 0.25.1? HOT 1
- Synchronising multiple topics HOT 3
- subscribe_param HOT 2
- Shared memory accessible within multiple callback functions
- Using struct methods as callback for subscription HOT 1
- rust analyzer not showing completion for custom messages but shows it for "built-in" messages like std_msgs/Header HOT 2
- First publish of publisher_node is lost HOT 3
- Example will not compile: Could not find `std_msgs` in `rosrust_msg` HOT 1
- dynamic_reconfigure with rosrust
- consider moving on from `error_chain` HOT 1
- Could `Publisher` gain a `has_subscribers()` function
- Is the ctrl-c shutdown handler needed? HOT 2
- thread leaks when using rosrust::api::Ros::new HOT 1
- spin_once implementation in rosrust
- rosrust subscribes to the entire parameter tree (/)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rosrust.