Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ qtcreator-*

# Catkin custom files
CATKIN_IGNORE

*.kdev4
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ find_package(catkin REQUIRED COMPONENTS
rviz
std_msgs
geometry_msgs
eigen_conversions
)

find_package(Eigen3 REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<depend>message_runtime</depend>
<depend>std_msgs</depend>
<depend>geometry_msgs</depend>
<depend>eigen_conversions</depend>

<export>
<rviz plugin="${prefix}/plugin_description.xml"/>
Expand Down
25 changes: 18 additions & 7 deletions src/tf_visual_tools_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ createTFTab::createTFTab(QWidget *parent) : QWidget(parent)
from_->lineEdit()->setPlaceholderText("Add new or select existing");
//from_->addItem(tr("Select existing or add new TF"));
connect(from_, SIGNAL(editTextChanged(const QString &)), this, SLOT(fromTextChanged(const QString &)));
from_->setCurrentText("world");

to_ = new QLineEdit;
to_->setPlaceholderText("to TF");
connect(to_, SIGNAL(textChanged(const QString &)), this, SLOT(toTextChanged(const QString &)));
to_->setText(QString("laser"));

add_imarker_ = new QCheckBox("i marker?", this);
add_imarker_->setCheckState(Qt::Unchecked);
add_imarker_->setCheckState(Qt::Checked);

add_imarker_menu_ = new QCheckBox("menus?", this);
add_imarker_menu_->setCheckState(Qt::Unchecked);
Expand Down Expand Up @@ -215,14 +217,14 @@ void createTFTab::createNewIMarker(tf_data new_tf, bool has_menu)

visualization_msgs::InteractiveMarker int_marker;
int_marker.header.frame_id = new_tf.from_;
int_marker.scale = 0.25;
int_marker.scale = 0.20;
int_marker.name = new_tf.name_.toStdString();

visualization_msgs::InteractiveMarkerControl box_control;
box_control.always_visible = true;
box_control.markers.push_back(marker);
box_control.interaction_mode = visualization_msgs::InteractiveMarkerControl::MOVE_ROTATE_3D;
int_marker.controls.push_back(box_control);
// visualization_msgs::InteractiveMarkerControl box_control;
// box_control.always_visible = true;
// box_control.markers.push_back(marker);
// box_control.interaction_mode = visualization_msgs::InteractiveMarkerControl::MOVE_ROTATE_3D;
// int_marker.controls.push_back(box_control);

// create the handles to control individual dofs
visualization_msgs::InteractiveMarkerControl control;
Expand Down Expand Up @@ -259,6 +261,15 @@ void createTFTab::createNewIMarker(tf_data new_tf, bool has_menu)
control.interaction_mode = visualization_msgs::InteractiveMarkerControl::MOVE_AXIS;
int_marker.controls.push_back(control);

// control.orientation.w = 1;
// control.orientation.x = 0;
// control.orientation.y = 1;
// control.orientation.z = 0;
// control.name = "move_plane_xy";
// control.interaction_mode = visualization_msgs::InteractiveMarkerControl::MOVE_PLANE;
// int_marker.controls.push_back(control);


imarker_server_->insert(int_marker);
imarker_server_->setCallback(int_marker.name, boost::bind( &createTFTab::processIMarkerFeedback, this, _1) );

Expand Down