Writing a tf2 broadcaster(Python): process has died [exit code -11]

asked 2019-02-26 05:48:42 -0600

doctor_zerios gravatar image

updated 2019-02-27 04:31:36 -0600

Hello, I'm following the tutorial on tf2 part 2


I followed all the steps but two errors occurred each time I use roslaunch command. I really can't figure out the problem...

Here's the verbose output of catkin_make:

$ catkin_make VERBOSE=1
Base path: /home/parallels/Desktop/workspace_prova
Source space: /home/parallels/Desktop/workspace_prova/src
Build space: /home/parallels/Desktop/workspace_prova/build
Devel space: /home/parallels/Desktop/workspace_prova/devel
Install space: /home/parallels/Desktop/workspace_prova/install
#### #### Running command: "make cmake_check_build_system" in "/home/parallels/Desktop/workspace_prova/build" ####
-- Using CATKIN_DEVEL_PREFIX: /home/parallels/Desktop/workspace_prova/devel
-- Using CMAKE_PREFIX_PATH: /home/parallels/Desktop/workspace_prova/devel;/opt/ros/melodic
-- This workspace overlays: /home/parallels/Desktop/workspace_prova/devel;/opt/ros/melodic
-- Found PythonInterp: /home/parallels/.conda/envs/py27/bin/python2 (found suitable version "2.7.15", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /home/parallels/.conda/envs/py27/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/parallels/Desktop/workspace_prova/build/test_results
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /home/parallels/.conda/envs/py27/bin/python2 (found version "2.7.15") 
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.14
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - learning_tf2
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'learning_tf2'
-- ==> add_subdirectory(learning_tf2)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/Desktop/workspace_prova/build
#### #### Running command: "make VERBOSE=1 -j2 -l2" in "/home/parallels/Desktop/workspace_prova/build" ####
/usr/bin/cmake -H/home/parallels/Desktop/workspace_prova/src -B/home/parallels/Desktop/workspace_prova/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/parallels/Desktop/workspace_prova/build/CMakeFiles /home/parallels/Desktop/workspace_prova/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/parallels/Desktop/workspace_prova/build'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/parallels/Desktop/workspace_prova/build'
/usr/bin/cmake -E cmake_progress_start /home/parallels/Desktop/workspace_prova/build/CMakeFiles 0

The output of the roslaunch:

$ roslaunch learning_tf2 start_demo.launch
... logging to /home/parallels/.ros/log/b5e285e2-39b2-11e9-9a4f-001c42e74aa6/roslaunch-parallels-Parallels-Virtual-Platform-9918.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://parallels-Parallels-Virtual-Platform:38695/


 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /turtle1_tf2_broadcaster/turtle: turtle1
 * /turtle2_tf2_broadcaster/turtle: turtle2

    sim (turtlesim/turtlesim_node)
    teleop (turtlesim/turtle_teleop_key)
    turtle1_tf2_broadcaster (learning_tf2/turtle_tf2_broadcaster.py)
    turtle2_tf2_broadcaster (learning_tf2/turtle_tf2_broadcaster.py)

ROS_MASTER_URI=http://localhost:11311 process[sim-1]: started with pid [9936] process[teleop-2]: started with pid [9937] process[turtle1_tf2_broadcaster-3]: started with pid [9938] process[turtle2_tf2_broadcaster-4]: started with pid [9939]
Reading from keyboard
Use arrow keys to move the turtle.
[turtle1_tf2_broadcaster-3] process has died [pid 9938, exit code -11, cmd /home/parallels/Desktop/workspace_prova/src/learning_tf2/nodes/turtle_tf2_broadcaster.py __name:=turtle1_tf2_broadcaster __log:=/home/parallels/.ros/log/b5e285e2-39b2-11e9-9a4f-001c42e74aa6/turtle1_tf2_broadcaster-3.log]. log file ...
edit retag flag offensive close merge delete


Actually the turtlesim pop out also without the roscore running.. seems strange

doctor_zerios gravatar image doctor_zerios  ( 2019-02-26 08:38:30 -0600 )edit

Just tested quickly and it works fine for me... Did you change anything in the python code? The turtle being spawn without a master (roscore) is normal, as when launching a file a master is started automatically if needed.

ffusco gravatar image ffusco  ( 2019-02-27 05:55:57 -0600 )edit

Nice to know that about the launch; i didn't change anything, just copy and paste. Maybe i forgot some passage in the building of the pkg or the workspace, but i created a new workspace, sourced the setup.bash and used the command to auto-create a pkg

doctor_zerios gravatar image doctor_zerios  ( 2019-02-27 07:17:25 -0600 )edit