Hello List,
After getting the rtt_ros_integration_example to work in my ros/orocos environment on Ubuntu 12.04 (64 bit),
I created a little bit more complex problem and have the following problem.
The program consists of 2 very simple Orocos components that communicate via 2 data ports.
One component sends data via a port and receives via another. The other component functions as an echo using the 2 ports.
The echo-component has an extra data port intended to be connected to a ROS topic.
Everything works until I put the following line (12) in epucktest.ops:
stream("EPCON.uitnaam", rostopic.connection("uitnaam"))
Then starting it using epucktest.launch I get
0.335 [ ERROR ][ScriptingService] /home/p100213/catkin_ws/src/epucktest/epucktest.ops :Parse error at line 12:
Service or Task "Deployer" has no Peer or Service rostopic (or Deployer was not found at all)
I think there is no parse error in line 19.
Here the relevant part of the echo component EpuckControl.cpp
EpuckControl::EpuckControl(std::string const& name) : TaskContext(name, PreOperational){
this->ports()->addPort("the_output_port", outputport ).doc("Data producing port.");
this->ports()->addPort("uitnaam", uitport ).doc("Logging port.");
this->ports()->addPort("the_input_port", inputport ).doc("Data consuming port.");
this->addAttribute("read_helper", read_helper);
}
void EpuckControl::updateHook(){
if ( inputport.read(val) == RTT::NewData ) {
outputport.write( val );
uitport.write( val );
}
}
And here epucktest.ops:
import("rtt_ros")
ros.import("epucktest")
var double Ts = 2.0
loadComponent("EPTEST", "EpuckTest")
loadComponent("EPCON", "EpuckControl")
setActivity("EPTEST",Ts,HighestPriority,ORO_SCHED_RT)
setActivity("EPCON",Ts,HighestPriority,ORO_SCHED_RT)
EPTEST.setPeriod(Ts)
EPCON.setPeriod(Ts)
stream("EPCON.uitnaam", rostopic.connection("uitnaam"))
connect ("EPTEST.outPortn","EPCON.the_input_port", ConnPolicy() )
connect ("EPTEST.inPortn","EPCON.the_output_port", ConnPolicy() )
EPCON.configure
EPCON.start
EPTEST.configure
EPTEST.start
Please find the complete package epucktest on
http://fwn06.housing.rug.nl/rosorocos
Anybody an idea what is going wrong?
There is nothing really different from the rtt_ros_integration_example I think.
Thanks in advance,
Sietse
Issue with connecting an Orocos port to a ROS topic
Hi,
In the page of Ros Groovy
http://wiki.ros.org/rtt_ros_integration?distro=groovy#rtt_ros_integratio...
you find
- Stream your component's data to a ROS topic:
stream("YourComponentName.YourRTTPortName", ros.topic("/topic_name"))
I see that in the hydro branch in github there is another example with
slightly different syntax (that looks like the one you are using)
https://github.com/jhu-lcsr/rtt_ros_examples/blob/master/rtt_ros_integra...
so maybe, if you use the groovy-based orocos (i have precompiled) you
should look at the first syntax, if you use the second, maybe you forgot
an import...
Cheers, Gianni.
On 06/20/2014 08:52 AM, Sietse Achterop wrote:
> Hello List,
>
> After getting the rtt_ros_integration_example to work in my ros/orocos environment on Ubuntu 12.04 (64 bit),
> I created a little bit more complex problem and have the following problem.
>
> The program consists of 2 very simple Orocos components that communicate via 2 data ports.
> One component sends data via a port and receives via another. The other component functions as an echo using the 2 ports.
> The echo-component has an extra data port intended to be connected to a ROS topic.
>
> Everything works until I put the following line (12) in epucktest.ops:
> stream("EPCON.uitnaam", rostopic.connection("uitnaam"))
>
> Then starting it using epucktest.launch I get
> 0.335 [ ERROR ][ScriptingService] /home/p100213/catkin_ws/src/epucktest/epucktest.ops :Parse error at line 12:
> Service or Task "Deployer" has no Peer or Service rostopic (or Deployer was not found at all)
>
> I think there is no parse error in line 19.
>
> Here the relevant part of the echo component EpuckControl.cpp
>
> EpuckControl::EpuckControl(std::string const& name) : TaskContext(name, PreOperational){
> this->ports()->addPort("the_output_port", outputport ).doc("Data producing port.");
> this->ports()->addPort("uitnaam", uitport ).doc("Logging port.");
> this->ports()->addPort("the_input_port", inputport ).doc("Data consuming port.");
> this->addAttribute("read_helper", read_helper);
> }
>
> void EpuckControl::updateHook(){
> if ( inputport.read(val) == RTT::NewData ) {
> outputport.write( val );
> uitport.write( val );
> }
> }
>
> And here epucktest.ops:
> import("rtt_ros")
> ros.import("epucktest")
>
> var double Ts = 2.0
> loadComponent("EPTEST", "EpuckTest")
> loadComponent("EPCON", "EpuckControl")
> setActivity("EPTEST",Ts,HighestPriority,ORO_SCHED_RT)
> setActivity("EPCON",Ts,HighestPriority,ORO_SCHED_RT)
> EPTEST.setPeriod(Ts)
> EPCON.setPeriod(Ts)
>
> stream("EPCON.uitnaam", rostopic.connection("uitnaam"))
>
> connect ("EPTEST.outPortn","EPCON.the_input_port", ConnPolicy() )
> connect ("EPTEST.inPortn","EPCON.the_output_port", ConnPolicy() )
> EPCON.configure
> EPCON.start
> EPTEST.configure
> EPTEST.start
>
>
> Please find the complete package epucktest on
> http://fwn06.housing.rug.nl/rosorocos
>
> Anybody an idea what is going wrong?
> There is nothing really different from the rtt_ros_integration_example I think.
>
> Thanks in advance,
> Sietse
>
Issue with connecting an Orocos port to a ROS topic
On 20-06-14 10:03, Gianni Borghesan wrote:
> I see that in the hydro branch in github there is another example with
> slightly different syntax (that looks like the one you are using)
>
> https://github.com/jhu-lcsr/rtt_ros_examples/blob/master/rtt_ros_integra...
>
> so maybe, if you use the groovy-based orocos (i have precompiled) you
> should look at the first syntax, if you use the second, maybe you forgot
> an import...
Hello Gianni,
thanks for the response. You're right, now added
import("rtt_roscomm")
and the components are running, but still no rostopic. I now get
0.164 [ Warning][ScriptingService] The protocol with id 3 did not register a fall-back handler for unknown types!
0.165 [ Warning][ScriptingService] triggered by: unknown_t which does not have a transport.
0.165 [ ERROR ][ScriptingService] Could not create transport stream for port uitnaam with transport id 3
0.165 [ ERROR ][ScriptingService] No such transport registered. Check your policy.transport settings or add the transport for type int
I also used type float, as in the rtt_ros_integration_example, but the error stays the same.
What does this error mean, and why is it triggered now, and not in the integration example?
Because of the fact that I have 2 components.
And how do I correct the settings as suggested by the error message?
Thanks again,
Sietse
Issue with connecting an Orocos port to a ROS topic
On Fri, Jun 20, 2014 at 10:37 AM, Sietse Achterop <s [dot] achterop [..] ...> wrote:
> On 20-06-14 10:03, Gianni Borghesan wrote:
>
>> I see that in the hydro branch in github there is another example with
>> slightly different syntax (that looks like the one you are using)
>>
>> https://github.com/jhu-lcsr/rtt_ros_examples/blob/master/rtt_ros_integra...
>>
>> so maybe, if you use the groovy-based orocos (i have precompiled) you
>> should look at the first syntax, if you use the second, maybe you forgot
>> an import...
>
> Hello Gianni,
> thanks for the response. You're right, now added
> import("rtt_roscomm")
> and the components are running, but still no rostopic. I now get
>
> 0.164 [ Warning][ScriptingService] The protocol with id 3 did not register a fall-back handler for unknown types!
> 0.165 [ Warning][ScriptingService] triggered by: unknown_t which does not have a transport.
Don't know yet why he starts complaining about unknown types here...
do you know which port triggers this ?
> 0.165 [ ERROR ][ScriptingService] Could not create transport stream for port uitnaam with transport id 3
> 0.165 [ ERROR ][ScriptingService] No such transport registered. Check your policy.transport settings or add the transport for type int
>
> I also used type float, as in the rtt_ros_integration_example, but the error stays the same.
> What does this error mean, and why is it triggered now, and not in the integration example?
> Because of the fact that I have 2 components.
> And how do I correct the settings as suggested by the error message?
Again a remark here about the error message.... A new user may not
realize that only ROS messages can be transportable.
We could probably make this explicit, like " 'int' is not a ROS
message or no RTT typekit for it was loaded. Please use only ROS
messages and make sure you imported the rtt_x_msgs typekit."
Peter
Issue with connecting an Orocos port to a ROS topic
2014-06-20 10:37 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
> On 20-06-14 10:03, Gianni Borghesan wrote:
>
>> I see that in the hydro branch in github there is another example with
>> slightly different syntax (that looks like the one you are using)
>>
>> https://github.com/jhu-lcsr/rtt_ros_examples/blob/master/rtt_ros_integra...
>>
>> so maybe, if you use the groovy-based orocos (i have precompiled) you
>> should look at the first syntax, if you use the second, maybe you forgot
>> an import...
>
> Hello Gianni,
> thanks for the response. You're right, now added
> import("rtt_roscomm")
> and the components are running, but still no rostopic. I now get
>
> 0.164 [ Warning][ScriptingService] The protocol with id 3 did not register a fall-back handler for unknown types!
> 0.165 [ Warning][ScriptingService] triggered by: unknown_t which does not have a transport.
> 0.165 [ ERROR ][ScriptingService] Could not create transport stream for port uitnaam with transport id 3
> 0.165 [ ERROR ][ScriptingService] No such transport registered. Check your policy.transport settings or add the transport for type int
>
you may miss a dependency on a rtt_ros_stdmsgs package(or something
equivalent (or something equivalent) which should be providing such
transports. I think it should be added in your manifest.
> I also used type float, as in the rtt_ros_integration_example, but the error stays the same.
> What does this error mean, and why is it triggered now, and not in the integration example?
> Because of the fact that I have 2 components.
> And how do I correct the settings as suggested by the error message?
>
> Thanks again,
> Sietse
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
Issue with connecting an Orocos port to a ROS topic
On 20-06-14 12:49, Willy Lambert wrote:
> 2014-06-20 10:37 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
>> On 20-06-14 10:03, Gianni Borghesan wrote:
Thanks for the response.
Part of the problem was that I used int instead of std_msgs::Float64 in the InputPort and
OutputPort like was done in the rtt_ros example. I thought that would be simpler....
(I am slowly getting more and more familiar with that complex beast that is
C++/ROS/OROCOS )
After setting it back to std_msgs::Float64 and also adding
import("rtt_std_msgs")
to the .ops file and making the package file the same as in the rtt_ros example
it now crashes with the following:
[FATAL] [1403263418.071965126]: You must call ros::init() before creating the first NodeHandle
[FATAL] [1403263418.072013316]: BREAKPOINT HIT
file = /tmp/buildd/ros-hydro-roscpp-1.10.2-0precise-20140304-0105/src/libros/node_handle.cpp
line=151
/home/p100213/ws/underlay_isolated/install_isolated/bin/deployer: line 20: 25931 Trace/breakpoint trap (core dumped) $cmd $*
[deployer_fwn_nb4_16_202_25907_4991055196949250071-1] process has died [pid 25925, exit code 133, cmd /home/p100213/ws/underlay/src/rtt_ros_integration/rtt_ros/scripts/deployer -l
info -s /home/p100213/catkin_ws/src/epucktest/epucktest.ops -- __name:=deployer_fwn_nb4_16_202_25907_4991055196949250071
__log:=/home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1.log].
log file: /home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1*.log
all processes on machine have died, roslaunch will exit
Where is ros::init() called?
This happens only when the "stream" command is in the .ops-file.
What is the problem, and again, why is the rtt_ros example working?
Sietse
PS The code is in http://fwn06.housing.rug.nl/rosorocos
Issue with connecting an Orocos port to a ROS topic
2014-06-20 14:00 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
> On 20-06-14 12:49, Willy Lambert wrote:
>> 2014-06-20 10:37 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
>>> On 20-06-14 10:03, Gianni Borghesan wrote:
>
> Thanks for the response.
> Part of the problem was that I used int instead of std_msgs::Float64 in the InputPort and
> OutputPort like was done in the rtt_ros example. I thought that would be simpler....
> (I am slowly getting more and more familiar with that complex beast that is
> C++/ROS/OROCOS )
This is not a simple task ;p It can take huge time and you may loose
many time bogged down in plumbing.
If I may advice you, think twice about your general architecture, it's
associated complexity and performance. Those frameworks solve a bunch
of problems, but a bunch of hard problems, so you still need to take
time to think about them. They won't solve automatically because you
have a framework :D
>
> After setting it back to std_msgs::Float64 and also adding
> import("rtt_std_msgs")
> to the .ops file and making the package file the same as in the rtt_ros example
> it now crashes with the following:
>
> [FATAL] [1403263418.071965126]: You must call ros::init() before creating the first NodeHandle
> [FATAL] [1403263418.072013316]: BREAKPOINT HIT
> file = /tmp/buildd/ros-hydro-roscpp-1.10.2-0precise-20140304-0105/src/libros/node_handle.cpp
> line=151
>
> /home/p100213/ws/underlay_isolated/install_isolated/bin/deployer: line 20: 25931 Trace/breakpoint trap (core dumped) $cmd $*
> [deployer_fwn_nb4_16_202_25907_4991055196949250071-1] process has died [pid 25925, exit code 133, cmd /home/p100213/ws/underlay/src/rtt_ros_integration/rtt_ros/scripts/deployer -l
> info -s /home/p100213/catkin_ws/src/epucktest/epucktest.ops -- __name:=deployer_fwn_nb4_16_202_25907_4991055196949250071
> __log:=/home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1.log].
> log file: /home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1*.log
> all processes on machine have died, roslaunch will exit
>
> Where is ros::init() called?
> This happens only when the "stream" command is in the .ops-file.
> What is the problem, and again, why is the rtt_ros example working?
>
> Sietse
>
>
> PS The code is in http://fwn06.housing.rug.nl/rosorocos
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
Issue with connecting an Orocos port to a ROS topic
On Fri, Jun 20, 2014 at 2:00 PM, Sietse Achterop <s [dot] achterop [..] ...> wrote:
> On 20-06-14 12:49, Willy Lambert wrote:
> > 2014-06-20 10:37 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
> >> On 20-06-14 10:03, Gianni Borghesan wrote:
>
> Thanks for the response.
> Part of the problem was that I used int instead of std_msgs::Float64 in
> the InputPort and
> OutputPort like was done in the rtt_ros example. I thought that would be
> simpler....
> (I am slowly getting more and more familiar with that complex beast that
> is
> C++/ROS/OROCOS )
>
> After setting it back to std_msgs::Float64 and also adding
> import("rtt_std_msgs")
> to the .ops file and making the package file the same as in the rtt_ros
> example
> it now crashes with the following:
>
> [FATAL] [1403263418.071965126]: You must call ros::init() before creating
> the first NodeHandle
> [FATAL] [1403263418.072013316]: BREAKPOINT HIT
> file =
> /tmp/buildd/ros-hydro-roscpp-1.10.2-0precise-20140304-0105/src/libros/node_handle.cpp
> line=151
>
> /home/p100213/ws/underlay_isolated/install_isolated/bin/deployer: line 20:
> 25931 Trace/breakpoint trap (core dumped) $cmd $*
> [deployer_fwn_nb4_16_202_25907_4991055196949250071-1] process has died
> [pid 25925, exit code 133, cmd
> /home/p100213/ws/underlay/src/rtt_ros_integration/rtt_ros/scripts/deployer
> -l
> info -s /home/p100213/catkin_ws/src/epucktest/epucktest.ops --
> __name:=deployer_fwn_nb4_16_202_25907_4991055196949250071
>
> __log:=/home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1.log].
> log file:
> /home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1*.log
> all processes on machine have died, roslaunch will exit
>
> Where is ros::init() called?
> This happens only when the "stream" command is in the .ops-file.
> What is the problem, and again, why is the rtt_ros example working?
>
>
ros::init is called if you load the rtt_rosnode plugin,
do you import("rtt_rosnode") before you create the stream?
Ruben
> Sietse
>
>
> PS The code is in http://fwn06.housing.rug.nl/rosorocos
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
Issue with connecting an Orocos port to a ROS topic
On Fri, Jun 20, 2014 at 3:36 PM, Ruben Smits
<ruben [dot] smits [..] ...> wrote:
>
>
>
> On Fri, Jun 20, 2014 at 2:00 PM, Sietse Achterop <s [dot] achterop [..] ...> wrote:
>>
>> On 20-06-14 12:49, Willy Lambert wrote:
>> > 2014-06-20 10:37 GMT+02:00 Sietse Achterop <s [dot] achterop [..] ...>:
>> >> On 20-06-14 10:03, Gianni Borghesan wrote:
>>
>> Thanks for the response.
>> Part of the problem was that I used int instead of std_msgs::Float64 in
>> the InputPort and
>> OutputPort like was done in the rtt_ros example. I thought that would be
>> simpler....
>> (I am slowly getting more and more familiar with that complex beast that
>> is
>> C++/ROS/OROCOS )
>>
>> After setting it back to std_msgs::Float64 and also adding
>> import("rtt_std_msgs")
>> to the .ops file and making the package file the same as in the rtt_ros
>> example
>> it now crashes with the following:
>>
>> [FATAL] [1403263418.071965126]: You must call ros::init() before creating
>> the first NodeHandle
>> [FATAL] [1403263418.072013316]: BREAKPOINT HIT
>> file =
>> /tmp/buildd/ros-hydro-roscpp-1.10.2-0precise-20140304-0105/src/libros/node_handle.cpp
>> line=151
>>
>> /home/p100213/ws/underlay_isolated/install_isolated/bin/deployer: line 20:
>> 25931 Trace/breakpoint trap (core dumped) $cmd $*
>> [deployer_fwn_nb4_16_202_25907_4991055196949250071-1] process has died
>> [pid 25925, exit code 133, cmd
>> /home/p100213/ws/underlay/src/rtt_ros_integration/rtt_ros/scripts/deployer
>> -l
>> info -s /home/p100213/catkin_ws/src/epucktest/epucktest.ops --
>> __name:=deployer_fwn_nb4_16_202_25907_4991055196949250071
>>
>> __log:=/home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1.log].
>> log file:
>> /home/p100213/.ros/log/0015363a-f6e4-11e3-8af7-002481150e15/deployer_fwn_nb4_16_202_25907_4991055196949250071-1*.log
>> all processes on machine have died, roslaunch will exit
>>
>> Where is ros::init() called?
>> This happens only when the "stream" command is in the .ops-file.
>> What is the problem, and again, why is the rtt_ros example working?
>>
>
> ros::init is called if you load the rtt_rosnode plugin,
>
> do you import("rtt_rosnode") before you create the stream?
Can our transport check for this condition and report that instruction
instead of letting ros bail out ?
Peter
Issue with connecting an Orocos port to a ROS topic
On 20-06-14 15:36, Ruben Smits wrote:
>
> ros::init is called if you load the rtt_rosnode plugin,
>
> do you import("rtt_rosnode") before you create the stream?
>
Thanks! That solved it!
(but this import wasn't in the rtt_ros example.)
Now I really am in business!
Thanks again.
Sietse