~shadowrobot/sr-ros-interface-ethercat/friction_comp_tests

« back to all changes in this revision

Viewing changes to sr_robot_lib/include/sr_robot_lib/sr_robot_lib.hpp

  • Committer: Mark Addison
  • Date: 2012-03-14 13:27:08 UTC
  • mfrom: (535.2.2 nullify_demand)
  • Revision ID: markpitchless.shadow@gmail.com-20120314132708-3isuoiv6btcq4vxv
Added a service to nullify the demand sent to the motor easily. This way the user can easily stop the control of the hand.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <diagnostic_updater/DiagnosticStatusWrapper.h>
43
43
 
44
44
#include <sr_robot_msgs/ForceController.h>
 
45
#include <sr_robot_msgs/NullifyDemand.h>
45
46
#include <sr_robot_msgs/SetDebugData.h>
46
47
 
47
48
#include <sr_utilities/sr_math_utils.hpp>
125
126
     */
126
127
    void reinitialize_sensors();
127
128
 
 
129
    /**
 
130
     * This service is used to nullify the demand of the etherCAT
 
131
     *  hand. If the nullify_demand parameter is set to True,
 
132
     *  the demand sent to the robot will be 0, regardless of the
 
133
     *  computed effort demanded by the controller. If set to False,
 
134
     *  then the demand computed by the controllers will be sent to the motors.
 
135
     *
 
136
     * @param request contains the nullify_demand parameter
 
137
     * @param response empty
 
138
     *
 
139
     * @return always true as it can't fail
 
140
     */
 
141
    bool nullify_demand_callback( sr_robot_msgs::NullifyDemand::Request& request,
 
142
                                  sr_robot_msgs::NullifyDemand::Response& response );
128
143
 
129
144
    /// The map used to calibrate each joint.
130
145
    shadow_joints::CalibrationMap calibration_map;
291
306
 
292
307
    boost::shared_ptr<generic_updater::MotorDataChecker> motor_data_checker;
293
308
 
 
309
    ///True if we want to set the demand to 0 (stop the controllers)
 
310
    bool nullify_demand_;
 
311
    ///The ROS service handler for nullifying the demand
 
312
    ros::ServiceServer nullify_demand_server_;
294
313
  };//end class
295
314
}//end namespace
296
315