0
$\begingroup$

I'm integrating orocos with ros, basically i created a component that read data from some input ports and write on output ports that create streams, because i want to public this values on ros topics and then read those values in plotjuggler.

So I created this component without any problem and work perfectly. After that i created used another ssd configured in the same way as the previos ssd in which i build this component that publish data on ROS but on this new ssd when i call the first createStream() it stuck without any error as if it is in an infinite loop. The only thing that i notice different from the other ssd is that i got the following message

[2022-05-06 12:33:28] [connect] WebSocket Connection 192.168.2.13:8081 v-2 "WebSocket++/0.7.0" /socket.io/?EIO=4&transport=websocket&t=1651833208 101

to create the stream I'm using, in the c++ code the following code

port.setName(<port_name>);
port.doc(<doc>);
port.createStream(rtt_roscomm::topic(<topic_name>));

i also tried to create the stream in the ops file, but i get exactly the same result, when it reach that point it stuck.

I repeat again that i have a working version of this component on a similar ssd, so this means that the code inside the component is should be correct as well as the ops file.

I'm on ubuntu 18.04.06 LTS, I'm using ROS melodic.

Is 1 week that I'm working on this issue without success, so i tried a lot of different things but at the end when i create a stream it stuck.

Ros is working because if i create a topic and i publish something from terminal or a create a simple ros package i can send and receive data, also orocos is working because i have different component running without problem.

I know that with so few information is difficult to solve the problem but why when i create a topic, with createStream, i get stuck in this loop?

There is any known case in which it is possible to remain stacked in this way during the creation of a topic in ros?

I perfectly know that it is very difficult to find a solution in this way even because it is a week that I'm struggling with this issue, and i tried a lot of different things.

I'm quite sure that the problem is when I create the ros topic because I have 3 ways to do it, that are

  1. inside the componet class using createStream(rtt_rostopic::topic("topic"))
  2. inside the componet after calling ros::init etc using the node.advertise<std_msgs::String>("topic", 1000);
  3. in the ops using stream("my_component.port", ros.comm.topic("topic"))

and with all these methods i get always the same problem. But in the first ssd createStream() works perfectly so i don't think the problem is in inside the component's code.

Another thing that I'm sure is that the topic does not exist, I want to create it and after that publish data on it so I'm creating the topic and I'm sure that this topic does not exist because if i run rostopic lists i cannot see the topic instead i can see the node that is running using rosnode lists.

One thing that i notice now is that in the rosout.log i have the following error

ERROR /mynode [....] [topics: here there are some topics till the one i get stuck ] [registerPublisher] Failed to contact master at [:11311] Retrying ...

$\endgroup$
2
  • $\begingroup$ This is going to need a lot more debugging information. Can you provide the rest of the code that you're calling? Have you tried debugging, and are you sure what line is hanging? Have you verified that the resources exist and it's not a duplicate of what you're trying to use for the first component? $\endgroup$
    – Chuck
    May 7 at 15:01
  • $\begingroup$ @Chuck I edited the question to add more information maybe i wasn't clear enough. Another thing that I want to clarify is that I'm not implementing 2 components that publish stuff on ros I'm just trying to replicate what i did on one computer to another computer and on first computer this works. what could be a reason why I get stuck in this way while creating a topic? knowing that the ros node exists and the ros topic does not exist $\endgroup$
    – DarioZ
    May 9 at 9:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.