bug fix and tested coppelia mirror node

This commit is contained in:
2024-08-14 14:25:40 +09:00
parent 7164bdf59d
commit 0b84820497
4 changed files with 77 additions and 40 deletions

View File

@@ -54,6 +54,7 @@ void sig_int_handler(int)
}
int main(int argc, char **argv)
{
if(signal(SIGINT, sig_int_handler) == SIG_ERR)
@@ -78,15 +79,19 @@ int main(int argc, char **argv)
sas::get_ros_param(nh,"/robot_mode", robot_driver_coppelia_configuration.robot_mode);
sas::get_ros_param(nh,"/using_real_robot", robot_driver_coppelia_configuration.using_real_robot);
sas::get_ros_param(nh,"/robot_topic_prefix", robot_driver_coppelia_configuration.robot_topic_prefix);
sas::get_ros_param(nh,"/q_min", robot_driver_coppelia_configuration.q_min);
sas::get_ros_param(nh,"/q_max", robot_driver_coppelia_configuration.q_max);
sas::get_ros_param(nh,"/robot_parameter_file_path", robot_driver_coppelia_configuration.robot_parameter_file_path);
// std::vector<double> q_min_vec, q_max_vec;
// sas::get_ros_param(nh,"/q_min", q_min_vec);
// robot_driver_coppelia_configuration.q_min = sas::std_vector_double_to_vectorxd(q_min_vec);
// sas::get_ros_param(nh,"/q_max", q_max_vec);
// robot_driver_coppelia_configuration.q_max = sas::std_vector_double_to_vectorxd(q_max_vec);
robot_driver_ros_configuration.robot_driver_provider_prefix = ros::this_node::getName();
try
{
ROS_INFO_STREAM(ros::this_node::getName()+"::Instantiating Coppelia robot.");
sas::RobotDriverCoppelia robot_driver_coppelia(robot_driver_coppelia_configuration,
sas::RobotDriverCoppelia robot_driver_coppelia(nh, robot_driver_coppelia_configuration,
&kill_this_process);
return robot_driver_coppelia.start_control_loop();