Ajout accès objets depuis launch file
This commit is contained in:
parent
6b4be0fecb
commit
9dddc9ba23
12 changed files with 183 additions and 4035 deletions
|
@ -66,10 +66,6 @@ unixio.h
|
||||||
zconf.h
|
zconf.h
|
||||||
./io_png/libs/zlib/zconf.h
|
./io_png/libs/zlib/zconf.h
|
||||||
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.cpp
|
|
||||||
ASIFT_matcher.hpp
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
|
||||||
|
|
||||||
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
/home/harle/catkin_ws/src/BaxterInterface/ASIFT_tests/demo_ASIFT_src/ASIFT_matcher.hpp
|
||||||
stdio.h
|
stdio.h
|
||||||
-
|
-
|
||||||
|
|
|
@ -1,4 +1,75 @@
|
||||||
0 3
|
71 3
|
||||||
0
|
0
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
|
2304.08 2293.73 332.25 205.584
|
||||||
|
1161.18 2778.84 269.82 254.458
|
||||||
|
1414.9 2657.67 440.427 231.923
|
||||||
|
1028 2673.95 1.17802e-38 7.48456e-39
|
||||||
|
1537.66 2845.07 0 0
|
||||||
|
1383.7 2790.68 0 0
|
||||||
|
1350.32 2639.27 2.15594e-37 1.11778e-37
|
||||||
|
1270.55 2905.01 0 0
|
||||||
|
1118.69 2762.63 113320 99552.2
|
||||||
|
1232.49 2641.46 49092.4 25144.2
|
||||||
|
1352.13 2619.01 682.178 313.83
|
||||||
|
1071.91 2662.27 -335.302 -195.818
|
||||||
|
1360.17 2686.37 1607.69 968.9
|
||||||
|
1996.41 3029.01 0 0
|
||||||
|
1121.59 2660.43 0 0
|
||||||
|
1077.11 2698.91 0 0
|
||||||
|
1202.31 2795.24 0 0
|
||||||
|
1426.46 2659.32 0 0
|
||||||
|
1337.66 2748.89 29227.3 21250
|
||||||
|
1201.01 2691.75 61922.9 39233.9
|
||||||
|
1747.17 1483.34 18287.3 21086.5
|
||||||
|
1047.52 2681.35 0 0
|
||||||
|
1196.8 2686.88 0 0
|
||||||
|
1094.65 2681.08 0 0
|
||||||
|
1488.82 2826.29 0 0
|
||||||
|
1975.28 2269.36 0 0
|
||||||
|
1076.52 2798.04 6665.33 7066.58
|
||||||
|
1357.38 2692.65 75331.8 46453.3
|
||||||
|
1351.9 2645.74 8898.41 4839.6
|
||||||
|
1227.84 2869.54 0 0
|
||||||
|
1076.8 2666.16 578.982 346.822
|
||||||
|
1218.07 2622.27 1086.31 513.075
|
||||||
|
1410.46 2813.4 0 0
|
||||||
|
1378.18 2640.08 0 0
|
||||||
|
1640.16 2587.89 0 0
|
||||||
|
1415.72 2649.67 8892.2 4492.96
|
||||||
|
1398.71 2709.9 0 0
|
||||||
|
1157.36 2698.18 0 0
|
||||||
|
1547.84 2817.26 466.046 376.233
|
||||||
|
1314.69 2622.82 2052.35 969.045
|
||||||
|
1003.69 2799.65 0 0
|
||||||
|
829.315 2006.11 0 0
|
||||||
|
1440.4 2771.07 0 0
|
||||||
|
1277.68 2714.4 0 0
|
||||||
|
689.515 1982.29 24080.3 19541.4
|
||||||
|
1279.65 2596.73 0 0
|
||||||
|
1388.62 2750.64 0 0
|
||||||
|
1221.49 2695.68 0 0
|
||||||
|
1329 2672.64 0 0
|
||||||
|
1445.2 2846.29 0 0
|
||||||
|
1181.14 2713.91 1578.52 1100.84
|
||||||
|
1550.21 2872.16 24636.4 8117.15
|
||||||
|
1468.96 2699.99 84869.2 51477.8
|
||||||
|
1241.22 2619.53 2246.6 1029.66
|
||||||
|
1146.9 2920.79 0 0
|
||||||
|
1121.34 2848.69 0 0
|
||||||
|
1172.49 2738.32 0 0
|
||||||
|
1184.45 2824.53 0 0
|
||||||
|
674.332 1973.16 911.344 763.4
|
||||||
|
1400.48 2806.97 44892.7 38216.1
|
||||||
|
1165.26 2747.48 33870 27770.6
|
||||||
|
1383.89 2685.4 1268.7 732.876
|
||||||
|
1167.85 2698.1 301.081 210.889
|
||||||
|
1386.73 2805.56 746.756 637.382
|
||||||
|
1412.42 2698.91 0 0
|
||||||
|
1251.92 2642.59 0 0
|
||||||
|
991.033 2675.39 0 0
|
||||||
|
1166.25 2772.02 3610.94 3001.45
|
||||||
|
2541.89 2751.16 0 0
|
||||||
|
1363.86 2640.9 0 0
|
||||||
|
829.315 2006.11 844.122 521.47
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
@ -144,32 +144,51 @@ int main(int argc, char **argv)
|
||||||
"book_training/000.png",
|
"book_training/000.png",
|
||||||
"book_training/train_image_003.png"};
|
"book_training/train_image_003.png"};
|
||||||
|
|
||||||
// unsigned int nb_ref =7;
|
// unsigned int nb_ref =26;
|
||||||
// std::string refData[] = {
|
// std::string refData[] = {
|
||||||
// // "robobo_references/0.jpg",
|
// "robobo_references/0.jpg",
|
||||||
// // "robobo_references/1.jpg",
|
// "robobo_references/1.jpg",
|
||||||
// // "robobo_references/2.jpg",
|
// "robobo_references/2.jpg",
|
||||||
// // "robobo_references/3.jpg",
|
// "robobo_references/3.jpg",
|
||||||
// // "robobo_references/4.jpg",
|
// "robobo_references/4.jpg",
|
||||||
// // "robobo_references/5.jpg",
|
// "robobo_references/5.jpg",
|
||||||
// // "robobo_references/6.jpg",
|
// "robobo_references/6.jpg",
|
||||||
|
// "robobo_references/7.jpg",
|
||||||
|
// "robobo_references/8.jpg",
|
||||||
|
// "robobo_references/9.jpg",
|
||||||
|
// "robobo_references/10.jpg",
|
||||||
|
// "robobo_references/11.jpg",
|
||||||
|
// "robobo_references/12.jpg",
|
||||||
|
// "robobo_references/13.jpg",
|
||||||
|
// "robobo_references/14.jpg",
|
||||||
|
// "robobo_references/15.jpg",
|
||||||
|
// "robobo_references/16.jpg",
|
||||||
|
// "robobo_references/17.jpg",
|
||||||
|
// "robobo_references/18.jpg",
|
||||||
|
// "robobo_references/19.jpg",
|
||||||
|
// "robobo_references/20.jpg",
|
||||||
|
// "robobo_references/21.jpg",
|
||||||
|
// "robobo_references/22.jpg",
|
||||||
|
// "robobo_references/23.jpg",
|
||||||
|
// "robobo_references/24.jpg",
|
||||||
|
// "robobo_references/25.jpg",
|
||||||
|
|
||||||
// "robobo_references/000.jpg",
|
// // "robobo_references/000.jpg",
|
||||||
// "robobo_references/001.jpg",
|
// // "robobo_references/001.jpg",
|
||||||
// "robobo_references/002.jpg",
|
// // "robobo_references/002.jpg",
|
||||||
// "robobo_references/003.jpg",
|
// // "robobo_references/003.jpg",
|
||||||
// "robobo_references/004.jpg",
|
// // "robobo_references/004.jpg",
|
||||||
// "robobo_references/005.jpg",
|
// // "robobo_references/005.jpg",
|
||||||
// "robobo_references/006.jpg",
|
// // "robobo_references/006.jpg",
|
||||||
|
|
||||||
// "robobo_references/000_2.jpg",
|
// // "robobo_references/000_2.jpg",
|
||||||
// "robobo_references/001_2.jpg",
|
// // "robobo_references/001_2.jpg",
|
||||||
// "robobo_references/002_2.jpg",
|
// // "robobo_references/002_2.jpg",
|
||||||
// "robobo_references/003_2.jpg",
|
// // "robobo_references/003_2.jpg",
|
||||||
// "robobo_references/004_2.jpg",
|
// // "robobo_references/004_2.jpg",
|
||||||
// "robobo_references/005_2.jpg",
|
// // "robobo_references/005_2.jpg",
|
||||||
// "robobo_references/006_2.jpg",
|
// // "robobo_references/006_2.jpg",
|
||||||
// "robobo_references/007_2.jpg",
|
// // "robobo_references/007_2.jpg", //Super lent ?!!
|
||||||
|
|
||||||
// "robobo_references/000.png",
|
// "robobo_references/000.png",
|
||||||
// "robobo_references/001.png",
|
// "robobo_references/001.png",
|
||||||
|
@ -279,7 +298,7 @@ int main(int argc, char **argv)
|
||||||
cout<<"Nb matching reference : "<<NbMatch.size()<<endl;
|
cout<<"Nb matching reference : "<<NbMatch.size()<<endl;
|
||||||
for(unsigned int i=0; i<NbMatch.size(); i++)
|
for(unsigned int i=0; i<NbMatch.size(); i++)
|
||||||
{
|
{
|
||||||
cout<<" "<<NbMatch[i]<<endl;
|
cout<<" Ref "<<i<<" : "<<NbMatch[i]<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int x,y,cx,cy;
|
int x,y,cx,cy;
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
BaxterInterface
|
# BaxterInterface
|
||||||
|
Bricks for an Rviz based interface for objective sending.
|
||||||
|
Maintainer: Antoine Harlé antoine.harle@etu.upmc.fr
|
||||||
|
|
1
README.md~
Normal file
1
README.md~
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# BaxterInterface
|
|
@ -1,15 +1,18 @@
|
||||||
<launch>
|
<launch>
|
||||||
<node name="rviz" pkg="rviz" type="rviz"/>
|
<node name="rviz" pkg="rviz" type="rviz"/>
|
||||||
|
|
||||||
|
<!--Objects/-->
|
||||||
|
<rosparam param="tracked_object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||||
|
<rosparam param="tracked_object_types"> [3, 2, 1, 0]</rosparam>
|
||||||
|
|
||||||
<!--Interface/-->
|
<!--Interface/-->
|
||||||
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
||||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||||
|
|
||||||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface"/>
|
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||||
|
|
||||||
<!--Matcher/-->
|
<!--Matcher/-->
|
||||||
<param name="tracked_object" value="Foo"/>
|
|
||||||
<param name="num_tilt" type="int" value="8"/>
|
<param name="num_tilt" type="int" value="8"/>
|
||||||
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
||||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/robobo_references.txt"/>
|
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/robobo_references.txt"/>
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||||
|
|
||||||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface"/>
|
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||||
|
|
||||||
<!--Matcher/-->
|
<!--Matcher/-->
|
||||||
<param name="tracked_object" value="Foo"/>
|
<rosparam param="tracked_object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||||
|
<rosparam param="tracked_object_types"> [3, 2, 1, 0]</rosparam>
|
||||||
<param name="num_tilt" type="int" value="8"/>
|
<param name="num_tilt" type="int" value="8"/>
|
||||||
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
||||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/book_references.txt"/>
|
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/robobo_references.txt"/>
|
||||||
<!--rosparam param="reference_data">[
|
<!--rosparam param="reference_data">[
|
||||||
"$(find asift_matching)/reference_data/train_image_000.png",
|
"$(find asift_matching)/reference_data/train_image_000.png",
|
||||||
"$(find asift_matching)/reference_data/train_image_001.png"]</rosparam-->
|
"$(find asift_matching)/reference_data/train_image_001.png"]</rosparam-->
|
||||||
|
|
|
@ -12,10 +12,10 @@ string name
|
||||||
# STATE_2D : Expect a 2D position and orientation (Dimension = 3).
|
# STATE_2D : Expect a 2D position and orientation (Dimension = 3).
|
||||||
# STATE_3D : Expect a 3D position and orientation (quaternion) (Dimension = 7).
|
# STATE_3D : Expect a 3D position and orientation (quaternion) (Dimension = 7).
|
||||||
# STATE_BOOL : Expect a single boolean information (ie bouton on/off) (Dimension = 1).
|
# STATE_BOOL : Expect a single boolean information (ie bouton on/off) (Dimension = 1).
|
||||||
uint8 ORDINARY=0
|
uint8 ORDINARY=0
|
||||||
uint8 STATE_2D=1
|
uint8 STATE_BOOL=1
|
||||||
uint8 STATE_3D=2
|
uint8 STATE_2D=2
|
||||||
uint8 STATE_BOOL=3
|
uint8 STATE_3D=3
|
||||||
|
|
||||||
uint8 state_type
|
uint8 state_type
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Represents a state space.
|
# Represents a state space.
|
||||||
|
|
||||||
# General info.
|
# General info.
|
||||||
#Header header
|
Header header
|
||||||
|
|
||||||
# Identifying string for this state space. (ID ?)
|
# Identifying string for this state space. (ID ?)
|
||||||
string name
|
string name
|
||||||
|
|
|
@ -11,15 +11,14 @@
|
||||||
RvizInterface::RvizInterface(): _server("RvizInterface")
|
RvizInterface::RvizInterface(): _server("RvizInterface")
|
||||||
{
|
{
|
||||||
std::string objective_topic, vizualization_topic, config_topic, position_topic;
|
std::string objective_topic, vizualization_topic, config_topic, position_topic;
|
||||||
//Need to load multiple object
|
std::vector<std::string> object_names;
|
||||||
std::string object_name;
|
std::vector<int> object_types;
|
||||||
|
|
||||||
//Load Param
|
//Load Topics param
|
||||||
_n.param<std::string>("objective_topic", objective_topic,"/RvizInterface/state_objective");
|
_n.param<std::string>("objective_topic", objective_topic,"/RvizInterface/state_objective");
|
||||||
_n.param<std::string>("vizualization_topic", vizualization_topic,"/RvizInterface/visual_marker");
|
_n.param<std::string>("vizualization_topic", vizualization_topic,"/RvizInterface/visual_marker");
|
||||||
_n.param<std::string>("config_topic", config_topic,"/RvizInterface/interface_config");
|
_n.param<std::string>("config_topic", config_topic,"/RvizInterface/interface_config");
|
||||||
_n.param<std::string>("object_center_topic", position_topic,"/ASIFT_matcher/object_center");
|
_n.param<std::string>("object_center_topic", position_topic,"/ASIFT_matcher/object_center");
|
||||||
_n.param<std::string>("tracked_object", object_name,"Object");
|
|
||||||
|
|
||||||
//Topic you want to publish
|
//Topic you want to publish
|
||||||
_objective_pub = _n.advertise<rviz_interface::StateSpace>(objective_topic, 10);
|
_objective_pub = _n.advertise<rviz_interface::StateSpace>(objective_topic, 10);
|
||||||
|
@ -29,10 +28,51 @@ RvizInterface::RvizInterface(): _server("RvizInterface")
|
||||||
_config_sub = _n.subscribe(config_topic, 1, &RvizInterface::configCallback, this);
|
_config_sub = _n.subscribe(config_topic, 1, &RvizInterface::configCallback, this);
|
||||||
_position_sub = _n.subscribe(position_topic, 1, &RvizInterface::positionCallback, this);
|
_position_sub = _n.subscribe(position_topic, 1, &RvizInterface::positionCallback, this);
|
||||||
|
|
||||||
_objects.push_back(new InteractiveObject(&_server, object_name, (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
//Load objects
|
||||||
_objects[0]->add6DOFcontrol();
|
_n.getParam("tracked_object_names",object_names);
|
||||||
|
_n.getParam("tracked_object_types",object_types);
|
||||||
|
|
||||||
// _objects.push_back(new InteractiveObject(&_server, "3DOF", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(1,1,0)));
|
int names_size = object_names.size();
|
||||||
|
|
||||||
|
if(names_size<object_types.size())
|
||||||
|
{
|
||||||
|
ROS_WARN("Missing object names. Objects without names won't be added...");
|
||||||
|
}
|
||||||
|
else if(names_size>object_types.size())
|
||||||
|
{
|
||||||
|
ROS_WARN("Missing object types. Missing types are set to Ordinary by default...");
|
||||||
|
while(names_size>object_types.size())
|
||||||
|
{
|
||||||
|
object_types.push_back(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(unsigned int i=0; i< names_size;i++)
|
||||||
|
{
|
||||||
|
switch(object_types[i])
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
_objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::ORDINARY, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
|
_objects[i]->add6DOFcontrol();
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
_objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::STATE_BOOL, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
|
_objects[i]->addButtoncontrol();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
_objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
|
_objects[i]->add3DOFcontrol();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
_objects.push_back(new InteractiveObject(&_server, object_names[i], (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
|
_objects[i]->add6DOFcontrol();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// _objects.push_back(new InteractiveObject(&_server, object_name, (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
|
// _objects[0]->add6DOFcontrol();
|
||||||
|
|
||||||
|
// _objects.push_back(new InteractiveObject(&_server, "3DOF", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(0,0,0)));
|
||||||
// _objects[1]->add3DOFcontrol();
|
// _objects[1]->add3DOFcontrol();
|
||||||
|
|
||||||
// _objects.push_back(new InteractiveObject(&_server, "3DOF 2", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(-1,1,0)));
|
// _objects.push_back(new InteractiveObject(&_server, "3DOF 2", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(-1,1,0)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue