roslaunch won't run node
I have a node that I can run successfully using:
rosrun <package> <node_name>
In my particular case, my package is called "robot_arm" and node is "ReceiveOrder":
rosrun robot_arm ReceiveOrder
However, ReceiveOrder crashes when I try to run it via a launch file:
<launch>
<rosparam command="load" file="$(find dispatcher)/dispatcher.yaml"/>
<rosparam command="load" file="$(find robot_arm)/robot.yaml"/>
<node name="ReceiveOrder" pkg="robot_arm" type="ReceiveOrder.py" output="screen"/>
</launch>
The error I get from running the launch file is as follows below. Why is this happening?
started roslaunch server http://HPLaptop:39521/
SUMMARY
========
PARAMETERS
* /motion_planning/orient_tolerance: 0.05
* /motion_planning/planning_engine: LBKPIECEkConfigDe...
* /motion_planning/position_tolerance: 0.05
* /motor_controller/num_motors: 6
* /motor_controller/rate: 50
* /order_timeout: 60
* /robot/feedback_rate: 10
* /robot/robot_id: 1
* /robot/robot_timeout: 20
* /rosdistro: indigo
* /rosversion: 1.11.19
NODES
/
ReceiveOrder (robot_arm/ReceiveOrder.py)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[ReceiveOrder-1]: started with pid [13096]
[ReceiveOrder-1] process has died [pid 13096, exit code -11, cmd /home/altemir/ar01/src/robot_arm/src/ReceiveOrder.py __name:=ReceiveOrder __log:=/home/altemir/.ros/log/a6ba0c8e-3cda-11e6-a0d0-002315aba7e4/ReceiveOrder-1.log].
log file: /home/altemir/.ros/log/a6ba0c8e-3cda-11e6-a0d0-002315aba7e4/ReceiveOrder-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
Is this related to Python Process Died Exit Code -11?
I try to do it and it works properly. According to me, the error comes from the python script. If the node runs correctly with
rosrun
, try to run your launch file without the node line to be sure. If it crashes, then it is that you have a problem with theroslaunch
, else, it is the python scriptThis slightly different than http://answers.ros.org/question/23808... although it appears to generate the same exit code -11. In this case, it's the launch file that triggering the error. In the previous thread, the moveit_commander.RobotCommander() line failed.
Thanks, lfr. Launch file runs fine without <node> line. Why would node run successfully with rosrun but not roslaunch?
I don't know but it seems there is a problem between roslaunch and your node in runtime. I don't know why but perhaps you have in your python script an instruction which is conflicting with the roslaunch environment. Else, I have no idea.
Were you able to solve this issue ? I am also facing the same problem for another package