Aggiunta funzione per portare il robot in configurazione Home da
interfaccia grafica, da implementare
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.9.1, 2019-10-23T10:43:57. -->
|
||||
<!-- Written by QtCreator 4.9.1, 2019-10-23T10:49:15. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -72,7 +72,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{b917fd33-cfca-4cf9-a8d9-025510846768}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
@@ -124,7 +124,7 @@
|
||||
<value type="QString">ROS_PACKAGE_PATH=/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src:/opt/ros/kinetic/share</value>
|
||||
<value type="QString">ROS_ROOT=/opt/ros/kinetic/share/ros</value>
|
||||
<value type="QString">ROS_VERSION=1</value>
|
||||
<value type="QString">SHLVL=172</value>
|
||||
<value type="QString">SHLVL=178</value>
|
||||
<value type="QString">TERM=xterm</value>
|
||||
<value type="QString">_=/usr/bin/env</value>
|
||||
</valuelist>
|
||||
@@ -471,19 +471,6 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.RunStepList</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.RunStepList.Step.0">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.ROSAttachToNode</value>
|
||||
<value type="bool" key="ProjectExplorer.RunStep.Enabled">false</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Arguments"></value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Command">debug</value>
|
||||
<value type="bool" key="ROSProjectManager.ROSGenericStep.DebugContinueOnAttach">false</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Package">roboglue_ros</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.PackagePath">/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src/roboglue_ros</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Target">roboglue_ros_recorder</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.TargetPath">/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/devel/lib/roboglue_ros/roboglue_ros_recorder</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.RunStepList.Step.1">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.ROSLaunchStep</value>
|
||||
@@ -496,7 +483,7 @@
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Target">roboglue_ros_urdriver.launch</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.TargetPath">/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src/roboglue_ros/launch/roboglue_ros_urdriver.launch</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.RunStepList.StepsCount">2</value>
|
||||
<value type="int" key="ProjectExplorer.RunStepList.StepsCount">1</value>
|
||||
</valuemap>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
@@ -505,7 +492,86 @@
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2">
|
||||
<value type="QString" key="Analyzer.Perf.CallgraphMode">dwarf</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.Events">
|
||||
<value type="QString">cpu-cycles</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="Analyzer.Perf.ExtraArguments"/>
|
||||
<value type="int" key="Analyzer.Perf.Frequency">250</value>
|
||||
<value type="QString" key="Analyzer.Perf.SampleMode">-F</value>
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Perf.StackSize">4096</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
|
||||
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
|
||||
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ROS Run Configuration</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">RoboGlueRUN_urOfficialDriver-noRviz</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.ROSRunConfigurationThis is a test</value>
|
||||
<valuemap type="QVariantMap" key="ROSProjectManager.RunStepList">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.RunStepList</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.RunStepList.Step.0">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ROSProjectManager.ROSLaunchStep</value>
|
||||
<value type="bool" key="ProjectExplorer.RunStep.Enabled">true</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Arguments"></value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Command">roslaunch</value>
|
||||
<value type="bool" key="ROSProjectManager.ROSGenericStep.DebugContinueOnAttach">true</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Package">roboglue_ros</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.PackagePath">/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src/roboglue_ros</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.Target">roboglue_ros_urdriver_norviz.launch</value>
|
||||
<value type="QString" key="ROSProjectManager.ROSGenericStep.TargetPath">/home/emanuele/Documents/GestioneMacchine/Robot_Incollaggio/Software/roboglue_ros_ws/src/roboglue_ros/launch/roboglue_ros_urdriver_norviz.launch</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.RunStepList.StepsCount">1</value>
|
||||
</valuemap>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">3</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
<param name="OUTcoordinates" type="string" value="/roboglue_com/ros2com/coordinates" />
|
||||
<param name="OUTdelta_jog" type="string" value="/jog_arm_server/delta_jog_cmds" />
|
||||
<param name="OUTdelta_joint_jog" type="string" value="/jog_arm_server/delta_joint_jog_cmds" />
|
||||
<param name="OUTtraj_jog" type="string" value="/pos_based_pos_traj_controller/command" />
|
||||
<!-- For UR official driver use scalable position controller -->
|
||||
<param name="OUTtraj_jog" type="string" value="/scaled_pos_traj_controller/command" />
|
||||
<param name="robot_model_name" type="string" value="robot_description" />
|
||||
<param name="move_group_name" type="string" value="manipulator" />
|
||||
<param name="loop_rate" type="int" value="100" />
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
20190308 - Inserita una funzione che si occupa di effettuare il blocco delle variaili.
|
||||
20190325 - Implementato uso del ros parameter server per la configurazione del nodo.
|
||||
Contiene i nomi delle code ros.
|
||||
20191023 - Passaggio dei commenti a GIT
|
||||
*/
|
||||
////////// ROS INCLUDES /////////////
|
||||
#include "ros/ros.h"
|
||||
@@ -21,6 +22,7 @@
|
||||
//////////////////////////////////////////
|
||||
void testFunction( ros::Publisher* trj_pub);
|
||||
trajectory_msgs::JointTrajectory composeTrjMessage(std::vector<double> jtpos);
|
||||
bool resetModelJointsHome(geometry_msgs::Pose, bool);
|
||||
|
||||
///////////////////////////////////////////
|
||||
///////// ROS CALLBACKS //////////////////
|
||||
@@ -45,7 +47,9 @@ void commandCallback(const std_msgs::String::ConstPtr& msg, internalState* is, p
|
||||
}
|
||||
else ROS_ERROR("Invalid acton");
|
||||
} else if (!command.compare("RECORD") || !command.compare("PLAY") || !command.compare("OPEN")) {
|
||||
return;
|
||||
return;
|
||||
} else if (!command.compare("HOME")) {
|
||||
// Chiamata alla funzione di reset dei giunti nel modello
|
||||
} else {
|
||||
ROS_WARN("Unknown command: %s", command.c_str());
|
||||
}
|
||||
@@ -242,6 +246,16 @@ int main(int argc, char **argv) {
|
||||
///////////// END MAIN /////////////////
|
||||
////////////////////////////////////////
|
||||
|
||||
// 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) {{
|
||||
ROS_DEBUG("Setting joint position to home");
|
||||
if (execute){
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
trajectory_msgs::JointTrajectory composeTrjMessage(std::vector<double> jtpos){
|
||||
static trajectory_msgs::JointTrajectory trj;
|
||||
static double ang=0.0;
|
||||
|
||||
Reference in New Issue
Block a user