【问题标题】:roslaunch failed: cannot launch noderoslaunch 失败:无法启动节点
【发布时间】:2020-11-30 15:47:16
【问题描述】:

我已经从here 下载并编译了一些Ros 节点(只是为了获得更多信息)。我正在尝试使用取自该存储库的launchfile 参数启动五个ROS 节点。

在执行source catkin_ws/devel_isolated/setup.bash并执行roslaunch crab.launch(上面链接中的启动文件)后出现下一个错误:

root@beaglebone:~# roslaunch crab.launch 
... logging to /root/.ros/log/4f6332fe-dbe2-11e3-86a8-7ec70b079d59/roslaunch-beaglebone-2067.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://beaglebone:58881/

SUMMARY
========

PARAMETERS
 * /clearance
 * /duration_ripple
 * /duration_tripod
 * /joint_lower_limit
 * /joint_upper_limit
 * /port_name
 * /robot_description
 * /rosdistro
 * /rosversion
 * /trapezoid_h
 * /trapezoid_high_radius
 * /trapezoid_low_radius

NODES
  /
    crab_body_kinematics (crab_body_kinematics/body_kinematics)
    crab_gait (crab_gait/gait_kinematics)
    crab_imu (crab_imu/imu_control)
    crab_leg_kinematics (crab_leg_kinematics/leg_ik_service)
    crab_maestro_controller (crab_maestro_controller/controller_sub)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
ERROR: cannot launch node of type [crab_leg_kinematics/leg_ik_service]: can't locate node [leg_ik_service] in package [crab_leg_kinematics]
ERROR: cannot launch node of type [crab_maestro_controller/controller_sub]: can't locate node [controller_sub] in package [crab_maestro_controller]
ERROR: cannot launch node of type [crab_body_kinematics/body_kinematics]: can't locate node [body_kinematics] in package [crab_body_kinematics]
ERROR: cannot launch node of type [crab_gait/gait_kinematics]: can't locate node [gait_kinematics] in package [crab_gait]
ERROR: cannot launch node of type [crab_imu/imu_control]: can't locate node [imu_control] in package [crab_imu]

我已经按照其他威胁中关于类似问题的建议重新安装了这些软件包。

我也注意到了

1º- 如果我将所有节点的executables 移动到文件夹src/&lt;package&gt;/,我就可以执行roslaunch crab.launch。但我不想就这样离开,这不是正确的工作方式;)

附加信息:

2º- 如果我执行,例如,source devel_isolated/&lt;package&gt;/setup.bash 然后 roslaunch crab.launch,我刚刚拥有的包 source-d 可以工作并执行......(而另一个仍然没有)

3º- 所以我有source-d 所有的source devel_isolated/&lt;package&gt;/setup.bash 并再试一次:这次没有人工作。

这导致认为问题是由于ROS变量环境引起的:如果我在2º之后创建export | grep ROS,我可以看到包路径出现在$ROS_PATH-s中,而其他的则不存在:

root@beaglebone:~# export | grep ROS
declare -x ROS_DISTRO="hydro"
declare -x ROS_ETC_DIR="/opt/ros/hydro/etc/ros"
declare -x ROS_MASTER_URI="http://localhost:11311"
declare -x ROS_PACKAGE_PATH="/root/catkin_ws/src/crab_msgs:/root/catkin_ws/src/joy:/root/catkin_ws
/src/ps3joy:/root/catkin_ws/src/xacro:/root/catkin_ws/src/roslint:/root/catkin_ws/src/kdl_parser:/root/catkin_ws
/src/urdf:/root/catkin_ws/src/urdf_parser_plugin:/root/catkin_ws/src:/opt/ros/hydro/share:/opt/ros/hydro
/stacks:/root/ros_catkin_ws/install_isolated/share:/root/ros_catkin_ws/install_isolated/stacks"
declare -x ROS_ROOT="/opt/ros/hydro/share/ros"
declare -x ROS_TEST_RESULTS_DIR="/root/catkin_ws/build_isolated/crab_msgs/test_results"

root@beaglebone:~# source catkin_ws/devel_isolated/crab_imu/setup.bash
declare -x ROS_PACKAGE_PATH="/root/catkin_ws/src/crab_imu:/root/catkin_ws/src/crab_msgs:/root/catkin_ws
/src/joy:/root/catkin_ws/src/ps3joy:/root/catkin_ws/src/xacro:/root/catkin_ws/src/roslint:/root/catkin_ws       
/src/kdl_parser:/root/catkin_ws/src/urdf:/root/catkin_ws/src/urdf_parser_plugin:/root/catkin_ws/src:/opt   
/ros/hydro/share:/opt/ros/hydro/stacks:/root/ros_catkin_ws/install_isolated/share:/root/ros_catkin_ws
/install_isolated/stacks"
declare -x ROS_TEST_RESULTS_DIR="/root/catkin_ws/build_isolated/crab_imu/test_results"

似乎 3º 覆盖了之前执行的 source...,这意味着 ROS_PACKAGE_PATH 中的所有包都没有出现。

我也尝试过强制ROS_PACKAGE_PATH使用exportcommand,但没有成功。所以,除此之外我还得改更多的环境变量,但不知道是哪一个...

所以,我不知道我的诊断是否正确,如果是,我应该怎么做才能纠正这个...希望我已经收集了足够的信息。

提前致谢!!

伊尼戈

【问题讨论】:

    标签: beagleboneblack ros


    【解决方案1】:

    设置文件的可执行位。很可能您需要为文件设置可执行权限。

    chmod +x filename.
    

    【讨论】:

      猜你喜欢
      • 2015-06-20
      • 1970-01-01
      • 2015-01-23
      • 1970-01-01
      • 2019-05-13
      • 2022-06-16
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多