@@ -50,7 +50,7 @@ const std::string INPUT_RECIPE = "examples/resources/rtde_input_recipe.txt";
5050
5151std::unique_ptr<ExampleRobotWrapper> g_my_robot;
5252
53- void signal_callback_handler (int signum)
53+ void signalCallbackHandler (int signum)
5454{
5555 std::cout << " Caught signal " << signum << std::endl;
5656 if (g_my_robot != nullptr )
@@ -68,7 +68,7 @@ struct DataStorage
6868 std::vector<urcl::vector6d_t > actual;
6969 std::vector<double > time;
7070
71- void write_to_file (const std::string& filename)
71+ void writeToFile (const std::string& filename)
7272 {
7373 std::fstream output (filename, std::ios::out);
7474 output << " timestamp,target0,target1,target2,target3,target4,target5,actual0,actual1,actual2,"
@@ -90,8 +90,8 @@ struct DataStorage
9090 }
9191};
9292
93- bool pd_control_loop (DataStorage& data_storage, const std::string& actual_data_name,
94- const comm::ControlMode control_mode, const urcl::vector6d_t & amplitude)
93+ bool pdControlLoop (DataStorage& data_storage, const std::string& actual_data_name, const comm::ControlMode control_mode ,
94+ const urcl::vector6d_t & amplitude)
9595{
9696 const int32_t running_time = 13 ;
9797 double time = 0.0 ;
@@ -165,7 +165,7 @@ bool pd_control_loop(DataStorage& data_storage, const std::string& actual_data_n
165165int main (int argc, char * argv[])
166166{
167167 // This will make sure that we stop controlling the robot if the user presses ctrl-c
168- signal (SIGINT, signal_callback_handler );
168+ signal (SIGINT, signalCallbackHandler );
169169
170170 urcl::setLogLevel (urcl::LogLevel::INFO);
171171
@@ -209,8 +209,8 @@ int main(int argc, char* argv[])
209209 g_my_robot->getUrDriver ()->startRTDECommunication ();
210210 URCL_LOG_INFO (" Start controlling the robot using the PD controller" );
211211 const bool completed_joint_control =
212- pd_control_loop (joint_controller_storage, " actual_q" , comm::ControlMode::MODE_PD_CONTROLLER_JOINT,
213- { 0.2 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 });
212+ pdControlLoop (joint_controller_storage, " actual_q" , comm::ControlMode::MODE_PD_CONTROLLER_JOINT,
213+ { 0.2 , 0.2 , 0.2 , 0.2 , 0.2 , 0.2 });
214214 if (!completed_joint_control)
215215 {
216216 URCL_LOG_ERROR (" Didn't complete pd control in joint space" );
@@ -229,8 +229,8 @@ int main(int argc, char* argv[])
229229 g_my_robot->stopConsumingRTDEData ();
230230 URCL_LOG_INFO (" Start controlling the robot using the PD controller with task space targets" );
231231 const bool completed_task_control =
232- pd_control_loop (task_controller_storage, " actual_TCP_pose" , comm::ControlMode::MODE_PD_CONTROLLER_TASK,
233- { 0.05 , 0.05 , 0.05 , 0.02 , 0.02 , 0.02 });
232+ pdControlLoop (task_controller_storage, " actual_TCP_pose" , comm::ControlMode::MODE_PD_CONTROLLER_TASK,
233+ { 0.05 , 0.05 , 0.05 , 0.02 , 0.02 , 0.02 });
234234 if (!completed_task_control)
235235 {
236236 URCL_LOG_ERROR (" Didn't complete PD control in task space" );
0 commit comments