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

Revision history [back]

click to hide/show revision 1
initial version

As the error message in detail explains, you cannot e.g. append to a list if the list isn't existent.

The line:

joint_state.name.append(str(name))

You have to setup the message with empty lists above the loop.