rosjava catkin_make失败

时间:2019-04-09 04:23:42

标签: python ros

我想在ubuntu16.04系统上安装rosjava。但是当我使用catkin_make时遇到了一个问题。

我遵循了该教程:

$ mkdir -p ~/rosjava/src
$ wstool init -j4 ~/rosjava/src https://raw.githubusercontent.com/rosjava/rosjava/kinetic/rosjava.rosinstall
$ source /opt/ros/kinetic/setup.bash
$ cd ~/rosjava
$ rosdep update
$ rosdep install –from-paths src -i -y
$ catkin_make

但是首先,我得到了 ERROR: error loading sources list: ('The read operation timed out',) rosdep更新时出错。 当我尝试使用catkin_make时,它失败了。 此外,我还尝试过更改Java版本。但是,它不起作用。

Base path: /home/yygx/rosjava
Source space: /home/yygx/rosjava/src
Build space: /home/yygx/rosjava/build
Devel space: /home/yygx/rosjava/devel
Install space: /home/yygx/rosjava/install
####
#### Running command: "make cmake_check_build_system" in "/home/yygx/rosjava/build"
####
####
#### Running command: "make -j4 -l4" in "/home/yygx/rosjava/build"
####
[  1%] Gradling tasks for rosjava_bootstrap
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeA
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestHeader
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestArrays
[  1%] Built target std_msgs_generate_messages_lisp
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_AddTwoInts
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_Composite
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_CompositeB
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestString
[  1%] Built target std_msgs_generate_messages_py
[  1%] Built target std_msgs_generate_messages_cpp
[  1%] Built target std_msgs_generate_messages_nodejs
[  1%] Built target std_msgs_generate_messages_eus
[  1%] Built target _rosjava_test_msgs_generate_messages_check_deps_TestPrimitives
[  3%] Compiling rosjava message artifacts for [std_msgs rosgraph_msgs std_srvs rosjava_test_msgs actionlib_msgs common_msgs diagnostic_msgs geometry_msgs nav_msgs sensor_msgs shape_msgs stereo_msgs trajectory_msgs visualization_msgs tf2_msgs ar_track_alvar_msgs uuid_msgs yocs_msgs concert_msgs concert_service_msgs gateway_msgs rocon_app_manager_msgs rocon_device_msgs rocon_interaction_msgs rocon_service_pair_msgs rocon_std_msgs rocon_tutorial_msgs world_canvas_msgs scheduler_msgs move_base_msgs map_store roscpp]
[  3%] Built target sensor_msgs_generate_messages_eus
[  3%] Built target sensor_msgs_generate_messages_py
[  3%] Built target tf2_msgs_generate_messages_nodejs
Traceback (most recent call last):
  File "/home/yygx/rosjava/src/genjava/scripts/genjava_message_artifacts", line 11, in <module>
    import genjava
  File "/home/yygx/rosjava/devel/lib/python3/dist-packages/genjava/__init__.py", line 35, in <module>
    exec(__fh.read())
  File "<string>", line 39, in <module>
  File "/home/yygx/rosjava/src/genjava/src/genjava/genjava_main.py", line 45, in <module>
    import rosjava_build_tools
  File "/home/yygx/rosjava/devel/lib/python3/dist-packages/rosjava_build_tools/__init__.py", line 35, in <module>
    exec(__fh.read())
  File "<string>", line 7, in <module>
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/__init__.py", line 36, in <module>
    _CHOSEN_PALETTE = _choose_palette()
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/detection.py", line 90, in choose_palette
    result, pal = detect_palette_support(basic_palette=pal)
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/detection.py", line 207, in detect_palette_support
    result, pal_name, basic_palette = _find_basic_palette(result)
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/detection.py", line 252, in _find_basic_palette
    if get_terminal_color('index', 2)[0][:2] == '4e':
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/detection.py", line 481, in get_terminal_color
    with TermStack() as fd:
  File "/home/yygx/anaconda3/lib/python3.7/site-packages/console/detection.py", line 52, in __enter__
    self.orig_attrs = self.termios.tcgetattr(self.fd)
termios.error: (25, 'Inappropriate ioctl for device')
rosjava_messages/CMakeFiles/rosjava_messages_generate_artifacts.dir/build.make:57: recipe for target 'rosjava_messages/CMakeFiles/rosjava_messages_generate_artifacts' failed
make[2]: *** [rosjava_messages/CMakeFiles/rosjava_messages_generate_artifacts] Error 1
CMakeFiles/Makefile2:1606: recipe for target 'rosjava_messages/CMakeFiles/rosjava_messages_generate_artifacts.dir/all' failed
make[1]: *** [rosjava_messages/CMakeFiles/rosjava_messages_generate_artifacts.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  3%] Built target tf2_msgs_generate_messages_lisp
[  3%] Built target sensor_msgs_generate_messages_lisp
[  3%] Built target gradle-rosjava_bootstrap
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

1 个答案:

答案 0 :(得分:1)

我只是在运行Ubuntu 16.04的新鲜LXC容器中执行了您的步骤-一切正常(catkin_make正常)。我想这个问题就在您的道路上。

堆栈跟踪跳转到:

/home/yygx/anaconda3/lib/python3.7/site-packages/console/__init__.py

这与ROS无关,也不应该是柔kin花结的一部分。

我不知道这是怎么回事,但我敢打赌,它可以以某种方式为Anaconda定制终端。如果是这样,那么当您安装Anaconda时,它可能会将自身插入$ PATH中的某个位置。

检查〜/ .bashrc或〜/ .bash_profile中是否有export PYTHONSTARTUP=export PATH=行指向/home/yygx/anaconda3/*

或者,只需跳过您的bash配置。在不进行配置的情况下启动bash:$ bash --noprofile或仅/bin/sh。 (有关详细信息,请参见here),然后再次运行教程命令。