Robotics StackExchange | Archived questions

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

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

http://wiki.ros.org/tf2/Tutorials/Writing%20a%20tf2%20broadcaster%20(Python)

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
-- Using CATKIN_ENABLE_TESTING: ON
-- 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
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  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/

SUMMARY
========

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

NODES
  /
    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: /home/parallels/.ros/log/b5e285e2-39b2-11e9-9a4f-001c42e74aa6/turtle1_tf2_broadcaster-3*.log
[turtle2_tf2_broadcaster-4] process has died [pid 9939, exit code -11, cmd /home/parallels/Desktop/workspace_prova/src/learning_tf2/nodes/turtle_tf2_broadcaster.py __name:=turtle2_tf2_broadcaster __log:=/home/parallels/.ros/log/b5e285e2-39b2-11e9-9a4f-001c42e74aa6/turtle2_tf2_broadcaster-4.log].
log file: /home/parallels/.ros/log/b5e285e2-39b2-11e9-9a4f-001c42e74aa6/turtle2_tf2_broadcaster-4*.log

Here the CMakeLists:

cmake_minimum_required(VERSION 2.8.3)
project(learning_tf2)

find_package(catkin REQUIRED COMPONENTS
   roscpp
   rospy
   tf2
   tf2_ros
   turtlesim
) 
catkin_package(
#   INCLUDE_DIRS include
#   LIBRARIES learning_tf2
#   CATKIN_DEPENDS roscpp rospy tf2 tf2_ros turtlesim
#   DEPENDS system_lib 
) 
include_directories(
   ${catkin_INCLUDE_DIRS} 
)
   install(PROGRAMS
    nodes/turtle_tf2_broadcaster.py
    DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
   )
  install(FILES
    start_demo.launch
#   myfile2
    DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
   )

I read all the questions about the topic and changed the CMakeList, but it didn't solved nothing... Has anyone had the some issue?

Asked by doctor_zerios on 2019-02-26 06:41:04 UTC

Comments

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

Asked by doctor_zerios on 2019-02-26 09:38:30 UTC

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.

Asked by ffusco on 2019-02-27 06:55:57 UTC

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

Asked by doctor_zerios on 2019-02-27 08:17:25 UTC

Answers