Commit 273dc3eb authored by Daniel Müller's avatar Daniel Müller
Browse files

Adjusted to homer_ptu_msgs update and integrated HomerPtuLib for future updates

parent b755cb1b
......@@ -15,7 +15,7 @@ find_package(catkin REQUIRED COMPONENTS
homer_msgs
tf
cmake_modules
homer_ptu_msgs
homer_ptu
actionlib
homer_robbie_architecture
trajectory_msgs
......
......@@ -18,8 +18,6 @@
#include <homer_mapnav_msgs/NavigateToPOI.h>
#include <homer_mapnav_msgs/StartNavigation.h>
#include <homer_mapnav_msgs/TargetUnreachable.h>
#include <homer_ptu_msgs/CenterWorldPoint.h>
#include <homer_ptu_msgs/SetPanTilt.h>
#include <nav_msgs/OccupancyGrid.h>
#include <nav_msgs/Path.h>
#include <sensor_msgs/LaserScan.h>
......
......@@ -4,8 +4,7 @@
<version>0.1.105</version>
<description>The homer_navigation package</description>
<maintainer email="fpolster@uni-koblenz.de">Florian Polster</maintainer>
<maintainer email="raphael@uni-koblenz.de">Raphael Memmesheimer</maintainer>
<maintainer email="muellerd@uni-koblenz.de">Daniel Müller</maintainer>
<author email="mknauf@uni-koblenz.de">Malte Knauf</author>
<license>GPLv3</license>
......@@ -17,7 +16,7 @@
<build_depend>geometry_msgs</build_depend>
<build_depend>homer_mapnav_msgs</build_depend>
<build_depend>homer_nav_libs</build_depend>
<build_depend>homer_ptu_msgs</build_depend>
<build_depend>homer_ptu</build_depend>
<build_depend>homer_msgs</build_depend>
<build_depend>homer_robbie_architecture</build_depend>
<build_depend>homer_tools</build_depend>
......@@ -41,7 +40,7 @@
<run_depend>eigen</run_depend>
<run_depend>homer_mapnav_msgs</run_depend>
<run_depend>homer_nav_libs</run_depend>
<run_depend>homer_ptu_msgs</run_depend>
<run_depend>homer_ptu</run_depend>
<run_depend>homer_msgs</run_depend>
<run_depend>homer_robbie_architecture</run_depend>
<run_depend>homer_tts</run_depend>
......
#include "homer_navigation/homer_navigation_node.h"
#include <homer_ptu/HomerPtuLib.h>
HomerNavigationNode::HomerNavigationNode()
{
ros::NodeHandle nh;
......@@ -45,9 +47,6 @@ HomerNavigationNode::HomerNavigationNode()
m_target_unreachable_pub = nh.advertise<homer_mapnav_msgs::TargetUnreachable>(
"/homer_navigation/target_unreachable", 3);
m_path_pub = nh.advertise<nav_msgs::Path>("/homer_navigation/path", 3);
m_ptu_center_world_point_pub
= nh.advertise<homer_ptu_msgs::CenterWorldPoint>("/ptu/center_world_point", 3);
m_set_pan_tilt_pub = nh.advertise<homer_ptu_msgs::SetPanTilt>("/ptu/set_pan_tilt", 3);
m_get_POIs_client
= nh.serviceClient<homer_mapnav_msgs::GetPointsOfInterest>("/map_manager/get_pois");
......@@ -415,11 +414,8 @@ void HomerNavigationNode::sendTargetUnreachableMsg(int8_t reason)
if (m_use_ptu)
{
// reset PTU
homer_ptu_msgs::SetPanTilt msg;
msg.absolute = true;
msg.panAngle = 0;
msg.tiltAngle = 0;
m_set_pan_tilt_pub.publish(msg);
homer_ptu::stop_focussing_view();
homer_ptu::set_ptu(0, 0);
}
m_state = IDLE;
......@@ -684,13 +680,11 @@ bool HomerNavigationNode::checkWaypoints()
ros::param::getCached("/homer_navigation/use_ptu", m_use_ptu);
if (m_use_ptu)
{
ROS_DEBUG_STREAM("Moving PTU to center next Waypoint");
homer_ptu_msgs::CenterWorldPoint ptu_msg;
ptu_msg.point.x = m_waypoints[0].pose.position.x;
ptu_msg.point.y = m_waypoints[0].pose.position.y;
ptu_msg.point.z = 0;
ptu_msg.permanent = true;
m_ptu_center_world_point_pub.publish(ptu_msg);
ROS_DEBUG_STREAM("Permanently focussing PTU on center next navigation waypoint.");
geometry_msgs::PointStamped ps;
ps.point = m_waypoints[0].pose.position;
ps.header = m_waypoints[0].header;
homer_ptu::focus_view(ps, true);
}
return true;
......@@ -953,11 +947,8 @@ void HomerNavigationNode::finalTurn()
if (m_use_ptu)
{
// reset PTU
homer_ptu_msgs::SetPanTilt msg;
msg.absolute = true;
msg.panAngle = 0;
msg.tiltAngle = 0;
m_set_pan_tilt_pub.publish(msg);
homer_ptu::stop_focussing_view();
homer_ptu::set_ptu(0, 0);
}
if (m_skip_final_turn)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment