~shadowrobot/sr-ros-interface/shadowhand-lib

« back to all changes in this revision

Viewing changes to sr_hand/src/hand/virtual_shadowhand.cpp

  • Committer: Ugo Cupcic
  • Date: 2012-03-28 05:49:55 UTC
  • mfrom: (349.1.1 fix-random-effort)
  • Revision ID: ugo@shadowrobot.com-20120328054955-lw2gzl156u2snctk
fixed the random force when linked to Gazebo

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
      //return the position
322
322
      iter->second.temperature = ((double)(rand() % 100) / 100.0);
323
323
      iter->second.current = ((double)(rand() % 100) / 100.0);
 
324
#ifndef GAZEBO
324
325
      iter->second.force = ((double)(rand() % 100) / 100.0);
 
326
#endif
325
327
 
326
328
      JointData tmp = JointData(iter->second);
327
329
 
344
346
      JointData tmpData = it->second;
345
347
      tmpData.temperature = ((double)(rand() % 100) / 100.0);
346
348
      tmpData.current = ((double)(rand() % 100) / 100.0);
 
349
#ifndef GAZEBO
347
350
      tmpData.force = ((double)(rand() % 100) / 100.0);
 
351
#endif
348
352
      tmpData.jointIndex = 0;
349
353
      tmpData.flags = "";
350
354