when rosrun works and roslaunch malfunctions

asked 2017-02-03 10:21:39 -0500

mr101470 gravatar image

I am just started to work with ROS and I am facing a strange problem. I have executable based on camera driver and another executable which just show the images grabbed (imshow_node). While I start the driver using rosrun and either rosrun or roslaunch imshow_node everything works fine, however if I use roslaunch to start the dirver, and then roslaunch the imshow_node it doesnt show the images, it doesnt give me error neither.

I dont know if anyone came cross this problem before and I appreciate your help Cheers.

edit retag flag offensive close merge delete

Comments

Can you add the launch file for the driver to your question? If the node can work properly, yet it simply fails when started from a launch file, it could be due to namespace changes or topic remappings that occur within the launch file.

Steven_Daniluk gravatar image Steven_Daniluk  ( 2017-02-03 10:49:30 -0500 )edit

here is the launch file for the driver : <launch>

<node name="pleora_polarcam_driver" pkg="pleora_polarcam" type="pleora_polarcam_driver" args="_ip:=169.254.56.68" output="screen"/>

    </launch>
mr101470 gravatar image mr101470  ( 2017-02-03 11:48:39 -0500 )edit

and here is the launch file for the node :

    <launch>
<node name="polar_process" pkg="pleora_polarcam" type="process_stokes_node" output="screen" />
    </launch>
mr101470 gravatar image mr101470  ( 2017-02-03 11:53:42 -0500 )edit

The launch file for pleora_polarcam_driver is passing in an argument for the ip address. Do you also supply that argument when starting it with rosrun?

Steven_Daniluk gravatar image Steven_Daniluk  ( 2017-02-03 13:32:10 -0500 )edit

Hi Steven, Yes, the ip I pass it in the rosrun as well, but after your comment I checked and infact, my node name for the driver was the same as the package name and I thought the name that I insert in the launch file, doest not need to be exactly the same. Thanks for your answer

mr101470 gravatar image mr101470  ( 2017-02-04 04:33:40 -0500 )edit

So it's working now?

Steven_Daniluk gravatar image Steven_Daniluk  ( 2017-02-04 11:42:51 -0500 )edit