Discussion:
[meta-arago] [meta-processor-sdk] [PATCH 2/2] mmwave-ros-autonomous-robotics: add turtlebot-teleop
Hongmei Gou
2018-11-21 21:44:42 UTC
Permalink
Signed-off-by: Hongmei Gou <***@ti.com>
---
.../files/0001-turtlebot-teleop-scripts.patch | 34 ++++++++++++++++++++++
.../mmwave-ros-autonomous-robotics_3.1.0.bb | 8 ++++-
2 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 recipes-ros/ros-mmwave/files/0001-turtlebot-teleop-scripts.patch

diff --git a/recipes-ros/ros-mmwave/files/0001-turtlebot-teleop-scripts.patch b/recipes-ros/ros-mmwave/files/0001-turtlebot-teleop-scripts.patch
new file mode 100644
index 0000000..b2270a6
--- /dev/null
+++ b/recipes-ros/ros-mmwave/files/0001-turtlebot-teleop-scripts.patch
@@ -0,0 +1,34 @@
+--- a/scripts/turtlebot_teleop_key
++++ b/scripts/turtlebot_teleop_key
+@@ -103,8 +103,8 @@
+ control_speed = 0
+ control_turn = 0
+ try:
+- print msg
+- print vels(speed,turn)
++ print (msg)
++ print (vels(speed,turn))
+ while(1):
+ key = getKey()
+ if key in moveBindings.keys():
+@@ -116,9 +116,9 @@
+ turn = turn * speedBindings[key][1]
+ count = 0
+
+- print vels(speed,turn)
++ print (vels(speed,turn))
+ if (status == 14):
+- print msg
++ print (msg)
+ status = (status + 1) % 15
+ elif key == ' ' or key == 'k' :
+ x = 0
+@@ -160,7 +160,7 @@
+ #print("publihsed: vx: {0}, wz: {1}".format(twist.linear.x, twist.angular.z))
+
+ except:
+- print e
++ print (e)
+
+ finally:
+ twist = Twist()
diff --git a/recipes-ros/ros-mmwave/mmwave-ros-autonomous-robotics_3.1.0.bb b/recipes-ros/ros-mmwave/mmwave-ros-autonomous-robotics_3.1.0.bb
index bfbfaa5..47243db 100644
--- a/recipes-ros/ros-mmwave/mmwave-ros-autonomous-robotics_3.1.0.bb
+++ b/recipes-ros/ros-mmwave/mmwave-ros-autonomous-robotics_3.1.0.bb
@@ -12,11 +12,12 @@ SRC_URI += "file://0001-turtlebot-bringup-description-launch-xml.patch;patchdir=
file://0001-turtlebot-navigation-params-yaml.patch;patchdir=${WORKDIR}/${P}/turtlebot/turtlebot_apps/turtlebot_navigation \
file://0001-turtlebot-mmwave-launchers-navigation-visualization-rviz.patch;patchdir=${S} \
file://0003-turtlebot-bringup-description.launch \
+ file://0001-turtlebot-teleop-scripts.patch;patchdir=${WORKDIR}/${P}/turtlebot/turtlebot/turtlebot_teleop \
"

S = "${WORKDIR}/${P}/turtlebot_mmwave_launchers"

-PR = "r0"
+PR = "r1"

inherit catkin

@@ -37,6 +38,10 @@ do_install_append() {
cp ${WORKDIR}/0003-turtlebot-bringup-description.launch ${D}${ros_datadir}/turtlebot_bringup/launch/description.launch
rm -rf ${D}${ros_datadir}/turtlebot_bringup/patches

+ install -d ${D}${ros_datadir}/turtlebot_teleop
+ cp -r ${WORKDIR}/${P}/turtlebot/turtlebot/turtlebot_teleop/* ${D}${ros_datadir}/turtlebot_teleop
+ rm -rf ${D}${ros_datadir}/turtlebot_teleop/patches
+
install -d ${D}${ros_datadir}/turtlebot_navigation
cp -r ${WORKDIR}/${P}/turtlebot/turtlebot_apps/turtlebot_navigation/* ${D}${ros_datadir}/turtlebot_navigation
rm -rf ${D}${ros_datadir}/turtlebot_navigation/patches
@@ -46,6 +51,7 @@ FILES_${PN} += "${ros_datadir}/turtlebot_mmwave_launchers"
FILES_${PN} += "${ros_datadir}/ti_mmwave_rospkg"
FILES_${PN} += "${ros_datadir}/turtlebot_bringup"
FILES_${PN} += "${ros_datadir}/turtlebot_description"
+FILES_${PN} += "${ros_datadir}/turtlebot_teleop"
FILES_${PN} += "${ros_datadir}/turtlebot_navigation"

ROS_SPN = "turtlebot_mmwave_launchers"
--
1.9.1
Loading...