ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

what is a number in joint_states/positions[2] in rqt ?

asked 2017-01-19 11:23:09 -0500

zakizadeh gravatar image

updated 2017-01-19 22:14:22 -0500

hi . For show plot of my robot I want use joint_states/positions[2]. what is 2 in command? The two refers to the third joint in URDF ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-19 12:48:11 -0500

NEngelhard gravatar image

The two refers to the third joint, whose name you get at joints_states/name[2].

BTW: please invest some seconds in roughly correct spelling.

edit flag offensive delete link more


The two refers to the third joint in URDF ??

zakizadeh gravatar image zakizadeh  ( 2017-01-19 22:13:35 -0500 )edit

Yes. This is common in computer science and is referred to as 0-based indexing:

ahendrix gravatar image ahendrix  ( 2017-01-19 23:48:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-01-19 11:23:09 -0500

Seen: 201 times

Last updated: Jan 19 '17