Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
56c43ff
removed keyboard depends
mcevoyandy Apr 26, 2017
f76dca3
start work on rviz tool
mcevoyandy Apr 26, 2017
249c622
simple panel working
mcevoyandy Apr 27, 2017
59b3417
basic tab layout and create tab
mcevoyandy Apr 28, 2017
a152817
format of add/remove tab
mcevoyandy Apr 29, 2017
89f76b6
work on manipulation tab
mcevoyandy Apr 30, 2017
7896388
work on increment layout
mcevoyandy May 2, 2017
b4a2dda
added save/load tab, gridlayout on increment tab
mcevoyandy May 3, 2017
a0f647b
added hooks to remote_receiver
mcevoyandy May 10, 2017
181b4e8
playing with pubs and msgs
mcevoyandy May 11, 2017
63dd0ac
work on add/remove comboboxes
mcevoyandy May 16, 2017
f29f830
work on populating gui elements with correct data
mcevoyandy May 17, 2017
47861cd
work on update tf msg
mcevoyandy May 17, 2017
34d5348
create/remove/update gui elements working
mcevoyandy May 18, 2017
b5b4ec0
added tf publisher
mcevoyandy May 18, 2017
d6a5a18
Update README.md
mcevoyandy May 18, 2017
103e644
from dropdown populated properly
mcevoyandy May 19, 2017
feb8b18
tf listeners setup and working
mcevoyandy May 19, 2017
4120ba1
update readme
mcevoyandy May 19, 2017
3b77953
load working
mcevoyandy May 20, 2017
bfdd0e4
save working
mcevoyandy May 21, 2017
65e5182
Fix eigen warning
davetcoleman May 29, 2017
1885c3e
Merge pull request #1 from davetcoleman/fix_eigen
mcevoyandy May 30, 2017
14a0893
added keyboard listener to manipulate tab, still need to implement fu…
mcevoyandy Jun 2, 2017
f10c95b
keyboard manipulation when manip tab in focus
mcevoyandy Jun 3, 2017
36058de
start of imarker integration
mcevoyandy Jun 5, 2017
a390e43
tf follows imarker, need to implement reverse
mcevoyandy Jun 6, 2017
5c9626b
imarkers follow gui and keyboard cmds
mcevoyandy Jun 7, 2017
8a570af
fix imarker tf bug
mcevoyandy Jun 15, 2017
4476533
.rviztf to .tf and start work on basic imarker right-click menus
mcevoyandy Jun 17, 2017
f480b03
work on creating imarker menus
mcevoyandy Jun 20, 2017
75875d2
menu pubs done
mcevoyandy Jun 21, 2017
349c77c
begin clean up for new package, begin documentation
mcevoyandy Jun 28, 2017
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
152 changes: 92 additions & 60 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ project(tf_keyboard_cal)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}")

find_package(catkin REQUIRED COMPONENTS
keyboard
roscpp
tf2
tf2_msgs
tf
roslib
roslint
Expand All @@ -16,76 +16,106 @@ find_package(catkin REQUIRED COMPONENTS
rviz_visual_tools
tf_conversions
interactive_markers
rviz
std_msgs
geometry_msgs
)

find_package(Eigen REQUIRED)
find_package(Eigen3 REQUIRED)

# Eigen 3.2 (Wily) only provides EIGEN3_INCLUDE_DIR, not EIGEN3_INCLUDE_DIRS
if(NOT EIGEN3_INCLUDE_DIRS)
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

find_package(Boost REQUIRED)

catkin_package(
INCLUDE_DIRS
include
include
LIBRARIES
${PROJECT_NAME}_manual_tf_alignment
${PROJECT_NAME}_imarker_simple
${PROJECT_NAME}_gui
# ${PROJECT_NAME}_manual_tf_alignment
# ${PROJECT_NAME}_imarker_simple
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to keep the imarker_simple functionality - I believe I am using it in other projects. Perhaps we can deprecate it if you have replacement functionality, but that would still need to be tick-tocked with the next ROS release

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep the python version but the old c++ version won't work at all since the keyboard package hasn't been updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi i've moved the imarker_simple functionality into rviz_visual_tools today, so this functionality is deprecated here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... i recommend you use it for your imarker needs though

CATKIN_DEPENDS
keyboard roscpp
# keyboard
message_runtime
roscpp
tf2
tf
rosparam_shortcuts
interactive_markers
DEPENDS
Eigen
EIGEN3
)

###########
## Build ##
###########
# Qt 4 or 5
if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
include(${QT_USE_FILE})
macro(qt_wrap_ui)
qt4_wrap_ui(${ARGN})
endmacro()
macro(qt_wrap_cpp)
qt4_wrap_cpp(${ARGN})
endmacro()
else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
macro(qt_wrap_cpp)
qt5_wrap_cpp(${ARGN})
endmacro()
endif()
## Prefer the Qt signals and slots to avoid defining "emit", "slots",
## etc because they can conflict with boost signals, so define QT_NO_KEYWORDS here.
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
add_definitions(-DQT_NO_KEYWORDS)

include_directories(
include
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIR}
${EIGEN_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)

# Library
add_library(${PROJECT_NAME}_manual_tf_alignment
src/manual_tf_alignment.cpp
)
target_link_libraries(${PROJECT_NAME}_manual_tf_alignment
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
###########
## Build ##
###########

# Library
add_library(${PROJECT_NAME}_imarker_simple
src/imarker_simple.cpp
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't kill this!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

## specify which header files need to be run through "moc",
## Qt's meta-object compiler.
qt_wrap_cpp(MOC_FILES
src/tf_keyboard_cal_gui.h
)
target_link_libraries(${PROJECT_NAME}_imarker_simple
${catkin_LIBRARIES}
${Boost_LIBRARIES}

## specify the list of source files, including the output of
## the previous command which is stored in ``${MOC_FILES}``.
set(SOURCE_FILES
src/tf_keyboard_cal_gui.cpp
)

# Executable
add_library(${PROJECT_NAME}_receiver src/tf_remote_receiver.cpp)
target_link_libraries(${PROJECT_NAME}_receiver ${catkin_LIBRARIES})

add_library(${PROJECT_NAME}_gui ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME}_gui ${PROJECT_NAME}_receiver ${rviz_DEFAULT_PLUGIN_LIBRARIES} ${QT_LIBRARIES} ${catkin_LIBRARIES})

add_library(${PROJECT_NAME}_rviz_publisher
src/rviz_tf_publisher.cpp)
target_link_libraries(${PROJECT_NAME}_rviz_publisher
${catkin_LIBRARIES})

add_executable(${PROJECT_NAME}
src/tf_keyboard.cpp
)
src/tf_keyboard.cpp)
target_link_libraries(${PROJECT_NAME}
${PROJECT_NAME}_manual_tf_alignment
${catkin_LIBRARIES}
)

# Executable
add_executable(${PROJECT_NAME}_demo_tf_listener
src/demo_tf_listener.cpp
)
# Rename C++ executable without namespace
set_target_properties(${PROJECT_NAME}_demo_tf_listener
PROPERTIES OUTPUT_NAME demo_tf_listener PREFIX "")
# Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_demo_tf_listener
${catkin_LIBRARIES}
)
${PROJECT_NAME}_rviz_publisher
${catkin_LIBRARIES})

#############
## Testing ##
Expand All @@ -99,26 +129,28 @@ roslint_cpp()
#############

# Install libraries
install(TARGETS ${PROJECT_NAME}_manual_tf_alignment ${PROJECT_NAME}_imarker_simple
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(
TARGETS
${PROJECT_NAME}_gui
LIBRARY DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
)

# Install header files
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

# Install shared resources
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# Install xml plugin config
install(FILES
plugin_description.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

# Install executables
install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_demo_tf_listener
install(TARGETS
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# Install scripts
install(PROGRAMS
scripts/tf_interactive_marker.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# Install launch files
install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
)
10 changes: 10 additions & 0 deletions README.md → README.old
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# NEW BRANCH
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better documentation than this please

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course :) Was waiting to finish implementing all the functionality I wanted.


```
roslaunch tf_keyboard_cal rviz_demo.launch
```

In `rviz` add the tf panel by: `Panel -> Add New Panel ->TFKeyboardCalGUI`



Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be better integrated into the README

# Manual TF Calibration Tools

Move /tf frames around using your keyboard or interactive markers - a simple calibration-by-eye tool!
Expand Down
27 changes: 27 additions & 0 deletions bug_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Bugs and Issues

Notes on bugs and issues seen during development.

## 1. Interactive Marker Reset

If you select `Enable Transparancy` under the Interactive Marker topic in Rviz BEFORE using the GUI buttons to adjust the marker's position, the marker will reset back to its origin. Once you adjust the marker through the GUI this problem seems to disappear.

## 2. Interactive Markers Branching from non Interactive Marker

If a TF is defined without an interactive marker and then a TF with is interactive marker is defined as a child of that, the interactive marker does not update properly when using the keyboard commands.

There seems to be a disconnect between the values of the imarker and the active tfs list.

### Fix

Seems that `active_tf_list_.push_back(new_tf)` was being called before `.imarker_ = true` was called. This appears to have solved the errors.

## 3. Large Decimals

On the `manipulate` tab, dragging the interactive marker causes large decimals. Need to display these only to 2 or 3 significant digits.

## 4. When `has menu` is ticked, tick `imarker` checkbox.

## 5. Multiple TFs with same name

Need to not allow user to create multiple TFs with same `to` and `from`, or create loops in TF tree.
15 changes: 15 additions & 0 deletions config/example_imarker_menu.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# example menu file
# (shebang anywhere in line comments line)
# FORMAT: (supports only 1 sub level, sub menus cannot have sub menus)
# (num sub menus), menu title
# submenu title
# very little error checking done... so check your input.
3, menu item A
sub entry 1
sub entry 2
sub entry 3
0, menu item B
0, menu item C
2, menu item D
sub entry 1
sub entry 2
11 changes: 11 additions & 0 deletions config/example_save_file.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ID FRAME_ID CHILD_FRAME_ID X Y Z ROLL PITCH YAW
# (comment line)
# space delimeter
0 a b 0.50 1.50 0.50 0.00 0.00 0.00
1 b c 1.00 0.00 1.00 0.00 0.00 0.00
2 b d 0.50 1.50 1.50 0.00 0.00 0.00
3 d e 1.00 -3.00 1.00 0.00 0.00 0.00
4 e f 1.00 3.00 1.00 0.00 0.00 0.00
5 f g 1.00 -3.00 1.00 0.00 0.00 0.00
6 g h 1.00 3.00 1.00 0.00 0.00 0.00
7 h i 1.00 -3.00 1.00 0.00 0.00 0.00
11 changes: 0 additions & 11 deletions config/tf_keyboard_world_to_thing.yaml

This file was deleted.

102 changes: 0 additions & 102 deletions include/tf_keyboard_cal/imarker_simple.h

This file was deleted.

Loading