Ajout Readme + Modif mineures interface
This commit is contained in:
parent
1c72d90e9a
commit
3300e0efd3
100 changed files with 298 additions and 63 deletions
17
rviz_interface/rviz_interface/launch/interface.launch
Normal file
17
rviz_interface/rviz_interface/launch/interface.launch
Normal file
|
@ -0,0 +1,17 @@
|
|||
<launch>
|
||||
<node name="rviz" pkg="rviz" type="rviz"/>
|
||||
|
||||
<!--Interface/-->
|
||||
<!--Objects/-->
|
||||
<param name="frame_id" value="/map"/>
|
||||
<rosparam param="object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||
<rosparam param="object_types"> [3, 2, 1, 0]</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||
|
||||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||
|
||||
</launch>
|
16
rviz_interface/rviz_interface/launch/interface.launch~
Normal file
16
rviz_interface/rviz_interface/launch/interface.launch~
Normal file
|
@ -0,0 +1,16 @@
|
|||
<launch>
|
||||
<node name="rviz" pkg="rviz" type="rviz"/>
|
||||
|
||||
<!--Interface/-->
|
||||
<!--Objects/-->
|
||||
<rosparam param="object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||
<rosparam param="object_types"> [3, 2, 1, 0]</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||
|
||||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||
|
||||
</launch>
|
|
@ -1,11 +1,12 @@
|
|||
<launch>
|
||||
<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/-->
|
||||
<!--Objects/-->
|
||||
<rosparam param="object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||
<rosparam param="object_types"> [3, 2, 1, 0]</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||
|
@ -13,13 +14,19 @@
|
|||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||
|
||||
<!--Matcher/-->
|
||||
<!--Matcher Parameters/-->
|
||||
<param name="tracked_object" value="Foo"/>
|
||||
<param name="num_tilt" type="int" value="8"/>
|
||||
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/robobo_references.txt"/>
|
||||
<!--rosparam param="reference_data">[
|
||||
"$(find asift_matching)/reference_data/train_image_000.png",
|
||||
"$(find asift_matching)/reference_data/train_image_001.png"]</rosparam-->
|
||||
|
||||
<param name="std_dev_filter_coeff" type="double" value="2"/>
|
||||
<!--Matcher References/-->
|
||||
<param name="reference_path" value="$(find asift_matching)/reference_data/"/>
|
||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/book_references.txt"/>
|
||||
<rosparam param="reference_data">[
|
||||
"train_image_000.png",
|
||||
"train_image_001.png"]
|
||||
</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="object_center_topic" value="/object_center"/>
|
||||
<param name="image_topic" value="/camera/rgb/image_raw"/>
|
||||
<param name="pointcloud_topic" value="/camera/depth_registered/points"/>
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
<node name="rviz" pkg="rviz" type="rviz"/>
|
||||
|
||||
<!--Interface/-->
|
||||
<!--Objects/-->
|
||||
<rosparam param="object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||
<rosparam param="object_types"> [3, 2, 1, 0]</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="objective_topic" value="/RvizInterface/state_objective"/>
|
||||
<param name="vizualization_topic" value="/RvizInterface/visual_marker"/>
|
||||
<param name="config_topic" value="/RvizInterface/interface_config"/>
|
||||
|
@ -9,15 +14,19 @@
|
|||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface" output="screen"/>
|
||||
|
||||
<!--Matcher/-->
|
||||
<rosparam param="tracked_object_names"> ["Foo", "KungFoo", "Panda", "Boo"]</rosparam>
|
||||
<rosparam param="tracked_object_types"> [3, 2, 1, 0]</rosparam>
|
||||
<!--Matcher Parameters/-->
|
||||
<param name="tracked_object" value="Foo"/>
|
||||
<param name="num_tilt" type="int" value="8"/>
|
||||
<param name="std_dev_filter_coeff" type="int" value="2"/>
|
||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/robobo_references.txt"/>
|
||||
<!--rosparam param="reference_data">[
|
||||
"$(find asift_matching)/reference_data/train_image_000.png",
|
||||
"$(find asift_matching)/reference_data/train_image_001.png"]</rosparam-->
|
||||
|
||||
<param name="std_dev_filter_coeff" type="double" value="0.5"/>
|
||||
<!--Matcher References/-->
|
||||
<param name="reference_path" value="$(find asift_matching)/reference_data/"/>
|
||||
<param name="reference_txt_path" value="$(find asift_matching)/reference_data/book_references.txt"/>
|
||||
<rosparam param="reference_data">[
|
||||
"train_image_000.png",
|
||||
"train_image_001.png"]
|
||||
</rosparam>
|
||||
|
||||
<!--Topics/-->
|
||||
<param name="object_center_topic" value="/object_center"/>
|
||||
<param name="image_topic" value="/camera/rgb/image_raw"/>
|
||||
<param name="pointcloud_topic" value="/camera/depth_registered/points"/>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<node name="rviz" pkg="rviz" type="rviz"/>
|
||||
|
||||
<!--Interface/-->
|
||||
<rosparam param="tracked_object_names"> ["6DOF"]</rosparam>
|
||||
<rosparam param="tracked_object_types"> [0]</rosparam>
|
||||
<rosparam param="object_names"> ["6DOF"]</rosparam>
|
||||
<rosparam param="object_types"> [0]</rosparam>
|
||||
<node name="RvizInterface" pkg="rviz_interface" type="RvizInterface"/>
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
unsigned int InteractiveObject::nextObjectID = 1;
|
||||
|
||||
//Constructeur
|
||||
InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape = Marker::CUBE, const tf::Vector3& position = tf::Vector3(0,0,0)) : _name(name), _type(type), _server(server), _showVisuals(true), _followObject(true)
|
||||
InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape = Marker::CUBE, const tf::Vector3& position) : _name(name), _type(type), _server(server), _showVisuals(true), _followObject(true)
|
||||
{
|
||||
_objectID = nextObjectID++;
|
||||
_state.name = name;
|
||||
|
@ -31,7 +31,7 @@ InteractiveObject::InteractiveObject(interactive_markers::InteractiveMarkerServe
|
|||
}
|
||||
|
||||
//Construit un InteractiveMarker
|
||||
void InteractiveObject::createInteractiveMarker(Marker& marker, const tf::Vector3& position = tf::Vector3(0,0,0))
|
||||
void InteractiveObject::createInteractiveMarker(Marker& marker, const tf::Vector3& position)
|
||||
{
|
||||
//// Création d'un marker interactif ////
|
||||
// _int_marker.header.frame_id = "/map"; //Par défaut
|
||||
|
|
|
@ -36,10 +36,10 @@ protected:
|
|||
ros::Publisher* _visual_pub;
|
||||
|
||||
public:
|
||||
InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape, const tf::Vector3& position);
|
||||
InteractiveObject(interactive_markers::InteractiveMarkerServer* server, const std::string& name, unsigned int type, unsigned int shape, const tf::Vector3& position = tf::Vector3(0,0,0));
|
||||
|
||||
//Construit un InteractiveMarker
|
||||
void createInteractiveMarker(Marker& marker, const tf::Vector3& position);
|
||||
void createInteractiveMarker(Marker& marker, const tf::Vector3& position = tf::Vector3(0,0,0));
|
||||
|
||||
//Fonction callback du serveur d' InteractiveMarker
|
||||
void processFeedback( const InteractiveMarkerFeedbackConstPtr &feedback );
|
||||
|
|
|
@ -13,6 +13,7 @@ RvizInterface::RvizInterface(): _server("RvizInterface")
|
|||
std::string objective_topic, vizualization_topic, config_topic, position_topic;
|
||||
std::vector<std::string> object_names;
|
||||
std::vector<int> object_types;
|
||||
std::string frame_id;
|
||||
|
||||
//Load Topics param
|
||||
_n.param<std::string>("objective_topic", objective_topic,"/RvizInterface/state_objective");
|
||||
|
@ -29,8 +30,9 @@ RvizInterface::RvizInterface(): _server("RvizInterface")
|
|||
_position_sub = _n.subscribe(position_topic, 1, &RvizInterface::positionCallback, this);
|
||||
|
||||
//Load objects
|
||||
_n.getParam("tracked_object_names",object_names);
|
||||
_n.getParam("tracked_object_types",object_types);
|
||||
_n.param<std::string>("frame_id", frame_id,"/map");
|
||||
_n.getParam("object_names",object_names);
|
||||
_n.getParam("object_types",object_types);
|
||||
|
||||
int names_size = object_names.size();
|
||||
|
||||
|
@ -57,7 +59,7 @@ RvizInterface::RvizInterface(): _server("RvizInterface")
|
|||
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();
|
||||
// _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)));
|
||||
|
@ -69,16 +71,6 @@ RvizInterface::RvizInterface(): _server("RvizInterface")
|
|||
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.push_back(new InteractiveObject(&_server, "3DOF 2", (int) rviz_interface::StateSpace::STATE_2D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(-1,1,0)));
|
||||
// _objects[2]->add3DOFcontrol(tf::Vector3(0.5,0.5,0));
|
||||
|
||||
// _objects.push_back(new InteractiveObject(&_server, "Button", (int) rviz_interface::StateSpace::STATE_3D, (int) visualization_msgs::Marker::SPHERE, tf::Vector3(1,-1,0)));
|
||||
|
||||
for(unsigned int i=0;i<_objects.size();i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue