Getting real time torque values from Rviz during move execution
I'm using Rviz to analyse the dynamics of a 6 DOF robotic arm model (UR5 from the ros industrial repos).
I want to obtain real-time dynamic torque values for all joints while executing a Planned move(Motion Planning -> Planning).
As of now, I'm able to simulate the motion by selecting the start and end states. I am also able to obtain static torque values for any given state through the onscreen display of torque values(Displays -> MotionPlanning -> Planning Metrics -> Show Joint Torques). But, while executing a move, these torque values don't update dynamically.
I primarily want to know of torques due to the acceleration of the joints when executing a particular move. Is there any way to get these torque values on Rviz, or maybe even through Moveit via code?
Asked by t27 on 2016-06-26 14:18:52 UTC
Answers
I don't know of any way to get these values 'out' of RViz (they're not published on a topic fi).
As I wrote in my earlier comment, these are calculated by the MoveIt RViz plugin. Searching the sources, they appear to be calculated in MotionPlanningDisplay::computeMetricsInternal(..)
(here), using an instance of the DynamicsSolver class. Lacking any way of getting the values out of the plugin, you could see whether you can instantiate a DynamicsSolver
yourself and have it calculate things for you whenever you want.
Asked by gvdhoorn on 2016-06-27 04:36:15 UTC
Comments
I ended up using Matlab's SimMechanics finally. I only wanted the dynamics values in a few cases and simmechanics took less time than modifying the code. Thanks
Asked by t27 on 2016-10-23 06:53:08 UTC
@t27 how to use SimMechanics for CAD model Dynamics value ?
Asked by lagankapoor on 2018-06-07 00:16:49 UTC
Comments
Just a note: RViz is not a (dynamic) simulator. The values you are referring to are calculated by the MoveIt RViz plugin, and are based entirely on the contents of the URDF that is loaded at that time. Rarely do URDFs contain the necessary info to make those values anywhere near accurate.
Asked by gvdhoorn on 2016-06-26 14:27:02 UTC
Could you suggest any way to get dynamic values from the URDF/SDF? I'm OK with the accuracy for now.
Asked by t27 on 2016-06-26 15:09:28 UTC
You mention
SDF
here, which is the format used by Gazebo, which is a dynamics simulator. Perhaps unnecessary, but please understand that RViz != Gazebo. If you meant SRDF, then that is a format used by MoveIt.Asked by gvdhoorn on 2016-06-27 04:37:53 UTC