Comments (9)
I've noticed that the two links you provided both point to the ros2 versions of the protocol, however rosnodejs is for ROS1 only so far. Just to check: you still want to implement the rosbridge protocol for ROS1, right?
from rosnodejs.
I've noticed that the two links you provided both point to the ros2 versions of the protocol, however rosnodejs is for ROS1 only so far. Just to check: you still want to implement the rosbridge protocol for ROS1, right?
sorry, forgot to change the branch, and Yes, I want to implement the protocol for ROS1, this is the ros1 source code
from rosnodejs.
Could you use the ros message type of the subscribed topic to figure out what type of values are in the array?
from rosnodejs.
Could you use the ros message type of the subscribed topic to figure out what type of values are in the array?
You mean using like this
const a = Rosnodejs.require("nav_msgs");
const b = new a.msg.OccupancyGrid();
console.log(a.msg);
console.log(b);
but this output:
{
Path: [class Path],
Odometry: [class Odometry],
MapMetaData: [class MapMetaData],
GridCells: [class GridCells],
OccupancyGrid: [class OccupancyGrid],
GetMapFeedback: [class GetMapFeedback],
GetMapActionGoal: [class GetMapActionGoal],
GetMapAction: [class GetMapAction],
GetMapActionFeedback: [class GetMapActionFeedback],
GetMapGoal: [class GetMapGoal],
GetMapActionResult: [class GetMapActionResult],
GetMapResult: [class GetMapResult]
}
OccupancyGrid {
header: Header { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: '' },
info: MapMetaData {
map_load_time: { secs: 0, nsecs: 0 },
resolution: 0,
width: 0,
height: 0,
origin: Pose { position: [Point], orientation: [Quaternion] }
},
data: []
}
It's not the same as rosmsg show nav_msgs/OccupancyGrid
std_msgs/Header header
uint32 seq
time stamp
string frame_id
nav_msgs/MapMetaData info
time map_load_time
float32 resolution
uint32 width
uint32 height
geometry_msgs/Pose origin
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
int8[] data
from rosnodejs.
Never mind, I'm aware that NodeJs is not suitable of CPU intensive tasks. I'm not going to implement this feature
from rosnodejs.
I wouldn't say that. Node.js has higher performance than python (because it is compiled, not interpreted) and the current rosbridge is implemented in python I believe.
from rosnodejs.
I wouldn't say that. Node.js has higher performance than python (because it is compiled, not interpreted) and the current rosbridge is implemented in python I believe.
Yes, the python version consumes too much CPU, so I would need to implement my own rosbridge in NodeJs (I think NodeJs is good for IO intensive tasks) for my frontend application. However, I'm not quite sure that compressing is the main cause of high CPU usage.
from rosnodejs.
If the goal was to help with front-end development then I would stay away from rosbridge. The reason why I got involved with rosnodejs in first place was exactly that: to natively connect from node.js to ROS and only send to the front-end what I needed in in a format and modality that is more appropriate for that task, rather than building on ROS messages. The main issue I saw was actually duplication. In ROS it is assumes that network bandwidth is plentiful and virtually unlimited, which is a fine assumption when communicating within a host only. So sending the same message at 100Hz is not a problem. Talking across devices, however, that very much is a problem. So de-duplication, and only selectively sending data is the name of the game.
This is all part of the reason why I started Transitive Robotics, to make it easy to build front-end features for robots, even when they are not on the same network. Happy to chat more and happy to share notes if you like.
from rosnodejs.
If the goal was to help with front-end development then I would stay away from rosbridge. The reason why I got involved with rosnodejs in first place was exactly that: to natively connect from node.js to ROS and only send to the front-end what I needed in in a format and modality that is more appropriate for that task, rather than building on ROS messages. The main issue I saw was actually duplication. In ROS it is assumes that network bandwidth is plentiful and virtually unlimited, which is a fine assumption when communicating within a host only. So sending the same message at 100Hz is not a problem. Talking across devices, however, that very much is a problem. So de-duplication, and only selectively sending data is the name of the game.
This is all part of the reason why I started Transitive Robotics, to make it easy to build front-end features for robots, even when they are not on the same network. Happy to chat more and happy to share notes if you like.
Thanks for the advice.
from rosnodejs.
Related Issues (20)
- Message generation breaks if git branch name ends with .msg
- xmlrpc lib crash ECONNRESET? HOT 6
- Can rosnodejs be used for mobile ROS applications? HOT 1
- Is it possible to receive message without deserialize? HOT 4
- UnhandledPromiseRejectionWarning: Error: ROS XMLRPC Error: no provider HOT 2
- How to registry a new msg. How to subscribe custom messages? I need help! HOT 3
- Incorrect timeout handling in _waitForActionServerToStart of ActionClientInterface
- How to import rosnodejs libraries using imort HOT 2
- Requesting non available gennodejs file HOT 4
- Create a melodic-devel branch and pull from my fork HOT 6
- Unknown client Subscriber error, from GlobalSpinner HOT 6
- Push latest version to npmjs HOT 1
- onTheFly error HOT 6
- _index.js items different from cmake add_message_files items HOT 2
- TypeError: Cannot read property 'msg' of undefined HOT 2
- Deal With Custom ROS Messages HOT 2
- Only the last message is published HOT 2
- Ros with Nodejs backend HOT 4
- rosnodejs.initNode is not a function HOT 3
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 rosnodejs.