ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

TypeError: 'int' object is not subscriptable when simulation try to open

asked 2023-03-27 15:42:48 -0600

Speedtail765 gravatar image

updated 2023-03-28 03:24:19 -0600

I have a robotic arm simulation (ur3_sim) but when I write 'roslaunch ur3_sim simulation.launch', it gives an error:

Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/__init__.py", line 347, in main
    p.start()
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 305, in start
    self._start_infrastructure()
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 254, in _start_infrastructure
    self._load_config()
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/parent.py", line 156, in _load_config
    self.config = roslaunch.config.load_config_default(self.roslaunch_files, self.port,
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/config.py", line 461, in load_config_default
    loader.load(f, config, argv=args, verbose=verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 763, in load
    self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 735, in _load_launch
    self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 701, in _recurse_load
    val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 96, in call
    return f(*args, **kwds)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 635, in _include_tag
    self._recurse_load(ros_config, launch.childNodes, child_ns, \
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 701, in _recurse_load
    val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 96, in call
    return f(*args, **kwds)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 635, in _include_tag
    self._recurse_load(ros_config, launch.childNodes, child_ns, \
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 697, in _recurse_load
    self._rosparam_tag(tag, context, ros_config, verbose=verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 96, in call
    return f(*args, **kwds)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/xmlloader.py", line 245, in _rosparam_tag
    self.load_rosparam(context, ros_config, cmd, param, file, value, verbose=verbose, subst_function=subst_function)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/loader.py", line 436, in load_rosparam
    self.add_param(ros_config, full_param, data, verbose=verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/loader.py", line 367, in add_param
    self.add_param(ros_config, ns_join(param_name, k), v, verbose=verbose)
  File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/names.py", line 172, in ns_join
    if is_private(name) or is_global(name):
  File "/opt/ros/noetic/lib/python3/dist-packages/rosgraph/names.py", line 133, in is_private
    return name and name[0] == PRIV_NAME
TypeError: 'int' object is not subscriptable

How can I solve this issue?

It is the link I use to install the simulation: https://github.com/EuropeanRoverChall... This installation includes ur3_sim pack: https://github.com/Michal-Bidzinski/U...

After faced on an error "No such file or directory" I added missing files and I try to launch "simulation.launch" which is given in the ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-28 08:59:28 -0600

Speedtail765 gravatar image

I solved, I notice that my joint_state_contoller.yaml was not exist. This topic can be closed.

edit flag offensive delete link more

Comments

This topic can be closed.

you should really post the broken version of joint_state_controller.yamland the fixed version.

That would help others who may run into the same problem.

gvdhoorn gravatar image gvdhoorn  ( 2023-03-28 09:06:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-03-27 15:42:48 -0600

Seen: 308 times

Last updated: Mar 28 '23