I am currently working on the joint torque limitations in a KUKA iiwa 14. In my VREP scene I added a graph showing the joint torques exerted at every joint. I attached a gripper (generic gripper, just a box) to the end-effector. In order to do so I used a force sensor as linking element.

I programmed a simple motion in order to easily analize what is going on in joints 2 and 4. I tested my scene by changing the gripper weight from 0.01 kg to 14 kg and then watched what happened in the joint torques. It turns out, joint torques are almost the same, as if the weight of the gripper had no effect at all. Then I tried the same thing but changing the weight of the 8th link. Here I got very different result! that added weight had its corresponding effect on joints 2 and 4, resulting on much bigger joint torques, as expected.

So, what am I doing wrong? Is it because the way the gripper is attached to the robot?

the weight at the tip of the manipulator is slightly colliding with the manipulator. You can either move the weight a little bit further away, or set the weight as non-respondable.

the weight is attached to a static shape, itself attached on a non-static shape. So we have: dynamic --> static --> dynamic, which doesn't make sense. You should attach the force sensor of the weight to object LBR_iiwa_14_R820_link8_resp.

hi
I am also trying to get joint torques of the motors of my robot and get it displayed using time graph. I have the joint torques using
topicName = simExtROS_enablePublisher('/joint_state',1,simros_strmcmd_get_joint_state,sim_handle_all,-1,'' )
but I am unable to understand change in torques while robot moves. why do i get torque values in negative? moreover torque of both motor joint are not same when they are moving straight or even not moving. like Left_joint_torq:0.006225 Right_joint_torq:0.001544 when robot is not moving. is this difference normal?
can I have a time graph that displays a product of velocity and torque of my joint? Is there any possibilty of calculating area under curve? like if I get power (product of velocity and torque of my joint) can I I integrate it over time?

you should first make sure to use the new ROS interface, since the old ros plugin you are referring to is deprecated.

The force/torque exerted on a joint is positive if the load attached to the joint is opposite to the joint torque/force setting. And negative if the load on the joint pulls towards the joint movement if there was no load on it.

You can display whatever graph you want. For that you can use user defined data streams. Have a look here for instance. And here you can find an example scene.