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

This is a Python problem, not a ROS one.

In a nutshell: r.joint_states references the method object. It does not call it.

That object reference is of type bound method Robotreacher.joint_states of <__main__.Robotreacher object at 0x7f78acd1cf40>.

To call it, you'd use:

print("r is", r.joint_states())

This is a Python problem, not a ROS one.

In a nutshell: r.joint_states references references the method object. It does not call it.

That object reference is of type bound method Robotreacher.joint_states of <__main__.Robotreacher object at 0x7f78acd1cf40>.

To call it, you'd use:

print("r is", r.joint_states())

This is a Python problem, not a ROS one.

In a nutshell: r.joint_states references the method object. It does not call it.

That object reference is of type bound method Robotreacher.joint_states of <__main__.Robotreacher object at 0x7f78acd1cf40>.

To call it, you'd use:

print("r is", r.joint_states())

note the () after the identifier joint_states.