personalrobotics / aikido

Artificial Intelligence for Kinematics, Dynamics, and Optimization

Home Page:https://personalrobotics.github.io/aikido/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RosJointStateClient is a bit of a mess

egordon opened this issue · comments

There are a few key issues with the RosJointStateClient:
https://github.com/personalrobotics/aikido/blob/master/src/control/ros/RosJointStateClient.cpp

(1) There's no reason to lock the mSkeleton mutex in spin, since we don't read or write from it at all.

(2) There is not reason to store the mSkeleton pointer anyway, since we never use it.

(3) We should decide on a better interface. Either [1] we should pass in a MetaSkeletonPtr (assuming the parent skeleton is already locked) and set the corresponding (subset of) DoFs directly, or [2] we should just return a copy of the buffer as a map from DoF name to position, and have the client set their own MetaSkeleton accordingly.