<commit_before>#pragma once

#include <cmath>
#include <string>

#include <actionlib/server/simple_action_server.h>
#include <control_msgs/GripperCommandAction.h>
#include <ros/node_handle.h>

#include <franka/exception.h>
#include <franka/gripper.h>
#include <franka/gripper_state.h>
#include <franka_gripper/GraspAction.h>
#include <franka_gripper/HomingAction.h>
#include <franka_gripper/MoveAction.h>
#include <franka_gripper/StopAction.h>

namespace franka_gripper {

/**
  * Reads a gripper state if possible
  *
  * @param[in] state A gripper state to update
  * @param[in] gripper A pointer to a franka gripper
  */
bool updateGripperState(const franka::Gripper& gripper, franka::GripperState* state);

/**
  * Wraps the execution of a gripper command action to catch exceptions and
  * report results
  *
  * @param[in] gripper A pointer to a franka gripper
  * @param[in] default_speed The default speed for a gripper action
  * @param[in] newton_to_m_ampere_factor The mapping factor from Newton to milli-Ampere
  * @param[in] action_server A pointer to a gripper action server
  * @param[in] goal A gripper action goal
  */
void gripperCommandExecuteCallback(
    const franka::Gripper& gripper,<commit_msg>milli-Ampere to milliampere<commit_after>#pragma once

#include <cmath>
#include <string>

#include <actionlib/server/simple_action_server.h>
#include <control_msgs/GripperCommandAction.h>
#include <ros/node_handle.h>

#include <franka/exception.h>
#include <franka/gripper.h>
#include <franka/gripper_state.h>
#include <franka_gripper/GraspAction.h>
#include <franka_gripper/HomingAction.h>
#include <franka_gripper/MoveAction.h>
#include <franka_gripper/StopAction.h>

namespace franka_gripper {

/**
  * Reads a gripper state if possible
  *
  * @param[in] state A gripper state to update
  * @param[in] gripper A pointer to a franka gripper
  */
bool updateGripperState(const franka::Gripper& gripper, franka::GripperState* state);

/**
  * Wraps the execution of a gripper command action to catch exceptions and
  * report results
  *
  * @param[in] gripper A pointer to a franka gripper
  * @param[in] default_speed The default speed for a gripper action
  * @param[in] newton_to_m_ampere_factor The mapping factor from Newton to milliampere
  * @param[in] action_server A pointer to a gripper action server
  * @param[in] goal A gripper action goal
  */
void gripperCommandExecuteCallback(
    const franka::Gripper& gripper,
{'fraction_non_alphanumeric': 0.09873521011831905, 'fraction_numerical': 0.0, 'mean_word_length': 5.239185750636132, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4819385', 'n_tokens_mistral': 859, 'n_tokens_neox': 854, 'n_words': 231}