Using multiple launch files from universal_robot_package in one launch file [closed]
Hi everyone!
Because everytime I want to work on my project I have to use these three commands:
roslaunch ur_gazebo ur5.launch limited:=true
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
Now I wanted to make my life easier and implement these three commands in a launch file and the results is shown below:
?xml version="1.0"?>
<launch>
<!-- Startup ur5.launch with arg "limited" -->
<include file="$(find ur_gazebo)/launch/ur5.launch">
<arg name="limited" value="true"/>
</include>
<!-- Startup ur5_moveit_planning_execution.launch with args: sim:=true and limited:=true -->
<include file="$(find ur5_moveit_config)/launch/ur5_moveit_planning_execution.launch">
<arg name="sim" value="true"/>
<arg name="limited" value="true"/>
</include>
<!-- Startup moveit_rviz.launch with arg: config:=true -->
<include file="$(find ur5_moveit_config)/launch/moveit_rviz.launch">
<arg name="config" value="true"/>
</include>
</launch>
Only the ur5.launch will startup using gazebo. The rest of them just doesn't seem to react. I do know when spawning nodes it is different and that I could output to screen in different terminals and stuff like that.
I hope somebody can tell me what I am doing wrong.
EDIT: The other nodes do not start up (also visible in rqt) and I do not see any logging from these nodes (because they do not startup obviously).
Thanks in advance,
Edwin van Emmerik
Please clarify what "just doesn't seem to react" means: launch files are passive, declarative entities, so they cannot 'react'. Are the nodes not being started? Do you not see any logging from those nodes that you'd expect to see? Something else?
I added some information, if something is unclear please say it just like u just did!
That's strange. I just tried your launch file (adding the missing
<
at the begging of the file) and it works as expected. One thing I would try is to lunch firstur_gazebo ur5.launch
, after that, launchur5_moveit_planning_execution.launch
andmoveit_rviz.launch
together.For some reason it couldn't read the file that I was assigning to. I think it had something to do with other files which had the same name. Mybad.. Thanks to you I knew the launch file worked though! Made me solve my problem!
can you explain what this means?
What were you doing exactly (command line)?
I tried to 'roslaunch universal-robot my_file.launch' from the main package where all of my files where located. I needed to replace this launch file to the folder( I chose ur_gazebo) and then call 'roslaunch ur_gazebo my_file.launch'.
Rookie mistake!
Do I understand you correctly that you had the launch file in the metapackage (ie:
universal_robot
) instead of a regular package?I'm not sure I understand how moving the launch file suddenly made it work.
Metapackages are not supposed to contain launch files, but that doesn't explain this.
Hi,
I re-created the problem because you said: 'but that doesn't explain this.'. However it is giving me this error: 'myfile.launch is neither a launch file in package universal_robot nor is universal_robot a launch file name'. Why do you think this happens? Does 'supposed to' mean never?