oceanscan / ros-imc-broker Goto Github PK
View Code? Open in Web Editor NEWROS IMC Broker
License: GNU General Public License v2.0
ROS IMC Broker
License: GNU General Public License v2.0
Hi all,
First of all, thanks for providing this example, it is working for us using Dune and our software. However, from now on we would like to make it work without Dune. After speaking to LSTS, apparently, the TCP client should be replaced by a TCP server and a UDP broadcast multicast is also needed. I tried to work on it and I was wondering if anyone here could help, since I have no experience working with asio tcp/udp nor with IMC or Neptus.
The version I have started is here: https://github.com/srv/ros-imc-broker/tree/feature/servers, which implements a ROS node offering these services, which I don't quite understand.
Has anyone time to give it a look?
Hey guys, we noticed that the broker crashes because of an unhandled exception if IMC::BufferTooShort
gets thown. The TCP buffers in TcpLink.hpp
are 1024 bytes long, and messages with a rawdata field (vector of char in C++) can easily exceed this. That throws IMC::BufferTooShort
, which is not caught, so the broker crashes.
Here's a minimal working example node implementation that triggers the crash:
#include <ros/ros.h>
#include <ros_imc_broker/ImcTypes.hpp>
int main(int argc, char** argv)
{
ros::init(argc, argv, "broker_bug");
ros::NodeHandle nh;
ros::Publisher pub =
nh.advertise<IMC::UASimulation>("/IMC/Out/UASimulation", 1);
ros::Rate rate(1);
while (ros::ok())
{
IMC::UASimulation msg;
msg.data = std::vector<char>(1000);
pub.publish(msg);
}
}
and I'll upload a zip with the whole MWE ros package, with CMakeLists, launch file, etc:
The desired behaviour is I suppose to print an error message or something such and carry on.
I am trying to use ros-imc-broker
as a bridge between ROS and Dune. At this stage, I am running simulations in Dune (e.g. lauv-xplore-1.ini
) and intend to subscribe to the generated messages, e.g. /IMC/In/Temperature
, IMC/In/Depth
, IMC/In/Pressure
, etc.
I am using ROS Noetic on Ubuntu 20.04. I had to update the code to C++11, by replacing lines 61 & 63 of params_changer_node.cpp
as follows:
61 static constexpr float c_entity_update = 60.0f;
63 static constexpr float c_entity_deactivation = 200.0f;
I am not compiling the code in a docker container, but rather as a normal ROS package. I am also running dune
and neptus
for the simulations.
With rostopic list
, I can see the full list of messages. By running the Dune simulator on its own (i.e. without initialising a simulated deployment in Neptus), rqt_graph
shows that the /IMC/In/Temperature
message is being passed by /ros_imc_broker_node
to the /settings
node.
However, running
rostopic echo /IMC/In/Temperature
returns the following error:
ERROR: Cannot load message class for [imc/Temperature]. Are your messages built?
I would be tempted to update the CMakeList.txt
file, but before going down that route, I was just wondering if you could quickly point out to me where I am going wrong?
Many thanks!
It looks like the call to boost ::asio::connect
hangs when it's not able to connect, so that when shutting down with ctrl-c it takes some time and then errors with escalating to SIGTERM
. Maybe possible to add a timeout or something?
Hi,
To get the broker up and running on my system without installing DUNE (but rather use the package in my dune build folder), i manually edited FindDUNE.cmake to explicitly search this path.
There seems to be functionality in https://github.com/oceanscan/ros-imc-broker/blob/master/workspace/src/ros_imc_broker/cmake/FindDUNE.cmake#L26 to add a path using the variable DUNE_ROOT, but I was unable to make it work as intended. Among others, I tried adding a bash environment variable DUNE_ROOT.
How is it supposed to be used?
Best regards,
Kristian
Do you have instructions for how to build and set up this package without Docker? The Docker instructions work well, but I'm trying to build it in my regular environment.
First off, thanks for the work on the package!
It is not clear what the license of the project is, as the "LICENSE" file says that it's GPL, but all of the source files contain the Apache license. Could you please clarify the situation?
When running in console:
rostopic echo /IMC/In/EstimatedState
ROS system replies
ERROR: Cannot load message class for [imc/EstimatedState]. Are your messages built?
This has something to do with message definitions being available to the whole workspace, and not only the package itself. If I were to publish a imc/VehicleState message, it would mean that there should be a ROS package named imc who builds a VehicleState.msg.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.