diff --git a/roboglue_ros_ws.workspace.user b/roboglue_ros_ws.workspace.user index c683a93..6ec2f07 100644 --- a/roboglue_ros_ws.workspace.user +++ b/roboglue_ros_ws.workspace.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -124,7 +124,7 @@ ROS_PACKAGE_PATH=/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src:/opt/ros/kinetic/share ROS_ROOT=/opt/ros/kinetic/share/ros ROS_VERSION=1 - SHLVL=178 + SHLVL=194 TERM=xterm _=/usr/bin/env diff --git a/src/roboglue_ros/include/roboglue_ros/roboglue_utils.h b/src/roboglue_ros/include/roboglue_ros/roboglue_utils.h index 540a003..a7ff362 100644 --- a/src/roboglue_ros/include/roboglue_ros/roboglue_utils.h +++ b/src/roboglue_ros/include/roboglue_ros/roboglue_utils.h @@ -96,7 +96,8 @@ typedef struct { const robot_state::JointModelGroup* joint_modelGroup; robot_model::RobotModelConstPtr kine_model; robot_state::RobotStatePtr kine_state; - std::vector joint_names; + std::map joint_names; + std::vector joint_homes; } robotData; typedef struct { diff --git a/src/roboglue_ros/src/.gitignore b/src/roboglue_ros/src/.gitignore new file mode 100644 index 0000000..f04bf34 --- /dev/null +++ b/src/roboglue_ros/src/.gitignore @@ -0,0 +1 @@ +*.cpp.autosave diff --git a/src/roboglue_ros/src/roboglue_follower.cpp b/src/roboglue_ros/src/roboglue_follower.cpp index b0dbc74..9faf16f 100644 --- a/src/roboglue_ros/src/roboglue_follower.cpp +++ b/src/roboglue_ros/src/roboglue_follower.cpp @@ -173,6 +173,8 @@ int main(int argc, char **argv) { positionData pos_data; robotData robot_data; auxData aux_data; + std::vector joint_names; + /// setup node parameters /// ros::init(argc, argv, "roboglue_follower"); ros::NodeHandle nh; @@ -191,6 +193,7 @@ int main(int argc, char **argv) { nh.getParam(param_ns+"OUTtraj_jog", ros_topics.traj_jog); nh.getParam(param_ns+"robot_model_name", robot_data.robot_model_name); nh.getParam(param_ns+"move_group_name", robot_data.move_group_name); + nh.getParam(param_ns+"joint_defaults/jointHomePosition", robot_data.joint_homes); nh.getParam("/roboglue_ros_follower/jog_pub_rate", jogPubRate); /// set spinner rate /// @@ -247,7 +250,7 @@ int main(int argc, char **argv) { //////////////////////////////////////// // TODO: aggiungere la possibilità di resettare i giunti nella configurazione home a comando da interfaccia -bool resetModelJointsHome(geometry_msgs::Pose home_pos, bool execute=false) {{ +bool resetModelJointsHome(geometry_msgs::Pose home_pos, bool execute=false) { ROS_DEBUG("Setting joint position to home"); if (execute){ return false;