Skip to content

Commit 3b39dc7

Browse files
committed
refactoring for release
1 parent f0176aa commit 3b39dc7

File tree

14 files changed

+107
-112
lines changed

14 files changed

+107
-112
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This config file for Travis CI utilizes ros-industrial/industrial_ci package.
22
# For more info for the package, see https://github.com/ros-industrial/industrial_ci/blob/master/README.rst
33

4-
dist: trusty
54
sudo: required
5+
dist: trusty
66
services:
77
- docker
88
language: generic

turtlebot3_automatic_parking/package.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_applications</url>
1313
<url type="website">http://turtlebot3.robotis.com</url>
1414
<buildtool_depend>catkin</buildtool_depend>
15-
<exec_depend>rospy</exec_depend>
16-
<exec_depend>std_msgs</exec_depend>
17-
<exec_depend>sensor_msgs</exec_depend>
18-
<exec_depend>geometry_msgs</exec_depend>
19-
<exec_depend>nav_msgs</exec_depend>
15+
<depend>rospy</depend>
16+
<depend>std_msgs</depend>
17+
<depend>sensor_msgs</depend>
18+
<depend>geometry_msgs</depend>
19+
<depend>nav_msgs</depend>
2020
</package>

turtlebot3_follower/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ include_directories(
3232
################################################################################
3333
# Install
3434
################################################################################
35-
catkin_install_python(PROGRAMS
35+
install(PROGRAMS
36+
scripts/add_comment
37+
scripts/add_data
38+
scripts/clf
39+
scripts/clf2
3640
scripts/follower.py
3741
scripts/laser_subscriber.py
3842
scripts/ploting.py

turtlebot3_follower/package.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<url type="website">http://turtlebot3.robotis.com</url>
1515
<buildtool_depend>catkin</buildtool_depend>
1616
<depend>rospy</depend>
17-
<depend>sensor_msgs</depend>
1817
<depend>std_msgs</depend>
19-
<depend>nav_msgs</depend>
18+
<depend>sensor_msgs</depend>
2019
<depend>geometry_msgs</depend>
20+
<depend>nav_msgs</depend>
2121
</package>

turtlebot3_follower/scripts/follower.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from sklearn.ensemble import RandomForestClassifier
77
import numpy as np
88

9-
109
class follower:
1110
def __init__(self):
1211
rospy.loginfo('Follower node initialized')
@@ -47,7 +46,6 @@ def check_people(self):
4746

4847
return ret
4948

50-
5149
def laser_scan(self):
5250
data_test=[]
5351
data_test_set=[]
@@ -117,6 +115,5 @@ def main():
117115
except rospy.ROSInterruptException:
118116
pass #print("Shutting down")
119117

120-
121118
if __name__ == '__main__':
122119
main()

turtlebot3_follower/scripts/laser_subscriber.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ def Subscriber(self):
2121
rospy.loginfo('%s', self.msg.ranges)
2222
self.laser_scan_data.append(self.msg)
2323

24-
2524
pickle.dump( self.comments, open( "add_comment", "wb"))
2625
pickle.dump( self.laser_scan_data, open( "add_data", "wb"))
2726

28-
2927
if __name__ == '__main__':
3028

3129
rospy.init_node('laser_subscriber')

turtlebot3_panorama/CMakeLists.txt

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,80 @@
1+
################################################################################
2+
# CMake
3+
################################################################################
14
cmake_minimum_required(VERSION 2.8.3)
25
project(turtlebot3_panorama)
36

4-
# Load catkin and all dependencies required for this package
5-
find_package(catkin REQUIRED COMPONENTS cmake_modules roscpp std_msgs std_srvs nav_msgs sensor_msgs geometry_msgs turtlebot3_msgs image_transport cv_bridge)
7+
################################################################################
8+
# Packages
9+
################################################################################
10+
find_package(catkin REQUIRED COMPONENTS
11+
roscpp
12+
rospy
13+
std_msgs
14+
std_srvs
15+
sensor_msgs
16+
geometry_msgs
17+
nav_msgs
18+
turtlebot3_msgs
19+
cv_bridge
20+
image_transport
21+
cmake_modules
22+
)
623
find_package(Boost REQUIRED COMPONENTS system)
7-
find_package(cmake_modules REQUIRED)
824
find_package(Eigen3 REQUIRED)
925
find_package(OpenCV REQUIRED)
1026

11-
# What other packages will need to use this package
27+
################################################################################
28+
# Declare ROS messages, services and actions
29+
################################################################################
30+
31+
################################################################################
32+
# Declare ROS dynamic reconfigure parameters
33+
################################################################################
34+
35+
################################################################################
36+
# Catkin specific configuration
37+
################################################################################
1238
catkin_package(
13-
INCLUDE_DIRS include
14-
CATKIN_DEPENDS
15-
DEPENDS Boost Eigen3 OpenCV
39+
INCLUDE_DIRS include
40+
CATKIN_DEPENDS roscpp rospy std_msgs std_srvs sensor_msgs geometry_msgs nav_msgs turtlebot3_msgs cv_bridge image_transport cmake_modules
41+
DEPENDS Boost Eigen3 OpenCV
1642
)
1743

18-
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS})
19-
20-
add_executable(panorama src/panorama.cpp)
21-
add_dependencies(panorama turtlebot3_msgs_gencpp)
22-
target_link_libraries(panorama ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${OpenCV_LIBRARIES})
44+
################################################################################
45+
# Build
46+
################################################################################
47+
include_directories(
48+
include
49+
${catkin_INCLUDE_DIRS}
50+
${Boost_INCLUDE_DIRS}
51+
${EIGEN_INCLUDE_DIRS}
52+
)
2353

24-
#############
25-
## Install ##
26-
#############
54+
add_executable(turtlebot3_panorama src/panorama.cpp)
55+
add_dependencies(turtlebot3_panorama ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
56+
target_link_libraries(turtlebot3_panorama ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${OpenCV_LIBRARIES})
2757

28-
# Mark executables and/or libraries for installation
29-
install(TARGETS panorama
30-
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
58+
################################################################################
59+
# Install
60+
################################################################################
61+
install(TARGETS turtlebot3_panorama
3162
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
3263
)
3364

34-
# Mark executable scripts (Python etc.) for installation
35-
install(PROGRAMS scripts/loop.py
36-
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
65+
install(PROGRAMS
66+
scripts/loop.py
67+
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
3768
)
3869

39-
# Mark anything (useful) else for installation
40-
install(DIRECTORY launch
41-
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
70+
install(DIRECTORY include/${PROJECT_NAME}/
71+
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
4272
)
4373

44-
install(DIRECTORY param
45-
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
74+
install(DIRECTORY launch param
75+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
4676
)
77+
78+
################################################################################
79+
# Test
80+
################################################################################

turtlebot3_panorama/include/turtlebot_panorama/geometry.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,23 @@
88
/*****************************************************************************
99
** Ifdefs
1010
*****************************************************************************/
11-
1211
#ifndef TURTLEBOT_PANORAMA_GEOMETRY_H_
1312
#define TURTLEBOT_PANORAMA_GEOMETRY_H_
1413

1514
/*****************************************************************************
1615
** Includes
1716
*****************************************************************************/
18-
1917
#include <cmath>
2018

2119
/*****************************************************************************
2220
** Namespaces
2321
*****************************************************************************/
24-
2522
namespace turtlebot_panorama
2623
{
2724

2825
/*****************************************************************************
2926
** Interfaces
3027
*****************************************************************************/
31-
3228
template<typename T>
3329
T degrees_to_radians(const T &degrees)
3430
{

turtlebot3_panorama/include/turtlebot_panorama/panorama.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
/*****************************************************************************
4141
** Ifdefs
4242
*****************************************************************************/
43-
4443
#ifndef PANORAMA_H_
4544
#define PANORAMA_H_
4645

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<launch>
2-
32
<!-- Camera Image Transport to raw--> I
4-
<node name="republish" type="republish" pkg="image_transport" output="screen" args="compressed in:=/raspicam_node/image raw out:=/camera/rgb/image_raw" />
5-
6-
<!-- <node name="pano_server" pkg="pano_ros" type="capture_server.py"/> -->
3+
<node pkg="image_transport" type="republish" name="republish" output="screen" args="compressed in:=/raspicam_node/image raw out:=/camera/rgb/image_raw" />
74

8-
<node name="turtlebot3_panorama" pkg="turtlebot3_panorama" type="panorama">
5+
<node pkg="turtlebot3_panorama" type="turtlebot3_panorama" name="turtlebot3_panorama">
96
<param name="default_mode" value="1"/>
107
<param name="default_pano_angle" value="6.28318530718"/> <!-- 2 * Pi -->
118
<param name="default_snap_interval" value="2.0"/>
129
<param name="default_rotation_velocity" value="0.3"/>
1310
<param name="camera_name" value="camera/rgb"/>
14-
<param name="bag_location" value="/tmp/turtlebot3_panorama.bag"/>
15-
11+
<param name="bag_location" value="/tmp/turtlebot3_panorama.bag"/>
1612
</node>
1713
</launch>

0 commit comments

Comments
 (0)