fmirus / torcs_ros

Code for interfacing torcs1.3.7 with ROS
17 stars 7 forks source link

ROS launch error #3

Closed Kim-BongSu closed 6 years ago

Kim-BongSu commented 6 years ago

I finished that Run torcs and Run the ROS components in this repository : roslaunch torcs_ros_bringup torcs_ros.launch

kbs@kbs-VirtualBox:~/catkin_ws/torcs_ros/torcs_ros_bringup/launch$ roslaunch torcs_ros.launch ... logging to /home/kbs/.ros/log/07d0f64a-0e2b-11e8-8316-0800278cffef/roslaunch-kbs-VirtualBox-4130.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.

Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 306, in main p.start() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start self._start_infrastructure() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure self._load_config() File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config roslaunch_strs=self.roslaunch_strs, verbose=self.verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default loader.load(f, config, verbose=verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 748, in load self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 720, in _load_launch self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 654, in _recurse_load default_machine, is_core, verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 684, in _recurse_load val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call return f(*args, **kwds) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 588, in _include_tag inc_filename = self.resolve_args(tag.attributes['file'].value, context) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 370, in resolve_args resolved = _resolve_args(resolved, context, resolve_anon, commands) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 383, in _resolve_args resolved = commands[command](resolved, a, args, context) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 151, in _find source_path_to_packages=source_path_to_packages) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 197, in _find_executable full_path = _get_executable_path(rp.get_path(args[0]), path) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path raise ResourceNotFound(name, ros_paths=self._ros_paths) ResourceNotFound: torcs_ros_client ROS path [0]=/opt/ros/kinetic/share/ros ROS path [1]=/home/kbs/catkin_ws/src ROS path [2]=/opt/ros/kinetic/share

how can i do?

fmirus commented 6 years ago

Do you have the correct version of torcs installed? the code in this repo only works with this version of torcs.

From your error message, it looks like ROS is unable to find the node torcs_ros_client. Might be a problem with the setup of your catkin workspace or a wrong ROS-package path instead of this package?

Kim-BongSu commented 6 years ago

Thanks but i had TORCS 1.3.7 version already. I try again. Sorry, but you don't manage screenpipe code(https://github.com/fmirus/torcs-1.3.7) any more? It's more easy to use in my case... I followed the screenpipe, but this same problem(https://github.com/fmirus/torcs-1.3.7/issues/1) occurred. On Windows 10, I created a client by applying scr-patch to torcs. However, when I connect to torcs server using that client, I do not know how to extract game image image from that server. Could you give me some tips or advice?

fmirus commented 6 years ago

just to quickly double check:

Kim-BongSu commented 6 years ago
  1. ye i've got the same torcs version 1.3.7
  2. echo #ROS_PACKAGE_PATH = /opt/ros/kinetic/share
  3. torcs_ros is in /home/kbs/catkin_ws/src

I reinstalled the whole process, i've got another error message like this. >>

while processing /opt/ros/kinetic/share/torcs_ros_client/launch/torcs_ros_client.xml: Invalid roslaunch XML syntax: [Errno 2] No such file or directory: u'/opt/ros/kinetic/share/torcs_ros_client/launch/torcs_ros_client.xml' The traceback for the exception was written to the log file

fmirus commented 6 years ago

your catkin workspace is not setup properly, so ROS can not find the torcs_ros executables. Check the catkin tutorial here and here for details. What you need to do is build your workspace by running catkin_make in /home/kbs/catkin_ws and afterwards run source /home/kbs/catkin_ws/devel/setup.bash. Afterwards, your ROS_PACKAGE_PATH should look like /home/kbs/catkin_ws/src:/opt/ros/kinetic/share and then ROS should be able to find torcs_ros

Kim-BongSu commented 6 years ago

Sometimes roslaunch will not run due to dependency problems, but it succeeded !! Thank you very much!!