# DRCsim 2.0 problem with effort control and /joint_commands topic

Hello, I updated to drcsim 2.0 and i'm having problems controlling the joint effort. as suggested in the user guide I send a message to /atlas/joint_commands with the desires efforts, and PID gains set to 0, the torques I'm getting look nothing like the command I give, first the amplitude never seem to rise above 0.5 Nm (, second there seems to be a huge delay (a second or so) between reference and output signal, could someone please elaborate on how the effort control is modeled in DRCsim? are there any controller dynamics I'm not aware of? In the previous versions it seemed as if commanded effort would go directly to torques in gazebo

another problem I'm having is plotting the commanded effort with rxplot. in order to compare the command to the output I want to plot them side by side. whenever I try plotting the command(\$rxplot /atlas/jointcommands/effort[17]) the plot appears but only the 1st value appears, after that the time axis start getting negative values (?!) and the plotting area stays clear, to work around this issue I send the same message to command topic and to /testtopic, plotting /test_topic seems to work just fine, any idea why rxplot is having problems with that particular topic?

edit retag close merge delete

Sort by » oldest newest most voted

The force in the JointCommands message is applied correctly, it's the effort returned by /atlas/joint_states that's faulty. It's using Joint::GetForce, which is returning incorrect values, I've ticketed this issue here. But a better fix for now is to assign it with effort that is to be applied in the same timestep.

more

UPDATE: found the cause for the second problem, apparently the messages were sent with no time stamp so rxplot couldn't plot them, so now I set the time stamp of the joint_commands message manually before sending and it works fine (I thought it was done automatically by the publisher)

the first problem still stands though.

more