Open Diksha-Moolchandani opened 4 years ago
You should add one line code to publish waypoints in line 192 in waypoint_generator.cpp
} else {
if (msg->pose.position.z > 0) {
// if height > 0, it's a normal goal;
geometry_msgs::PoseStamped pt = *msg;
if (waypoint_type == string("noyaw")) {
double yaw = tf::getYaw(odom.pose.pose.orientation);
pt.pose.orientation = tf::createQuaternionMsgFromYaw(yaw);
}
waypoints.poses.push_back(pt);
publish_waypoints_vis();
**publish_waypoints();**
} else if (msg->pose.position.z > -1.0) {
// if 0 > height > -1.0, remove last goal;
if (waypoints.poses.size() >= 1) {
waypoints.poses.erase(std::prev(waypoints.poses.end()));
}
publish_waypoints_vis();
} else {
// if -1.0 > height, end of input
if (waypoints.poses.size() >= 1) {
publish_waypoints_vis();
publish_waypoints();
}
You should add one line code to publish waypoints in line 192 in waypoint_generator.cpp
} else { if (msg->pose.position.z > 0) { // if height > 0, it's a normal goal; geometry_msgs::PoseStamped pt = *msg; if (waypoint_type == string("noyaw")) { double yaw = tf::getYaw(odom.pose.pose.orientation); pt.pose.orientation = tf::createQuaternionMsgFromYaw(yaw); } waypoints.poses.push_back(pt); publish_waypoints_vis(); **publish_waypoints();** } else if (msg->pose.position.z > -1.0) { // if 0 > height > -1.0, remove last goal; if (waypoints.poses.size() >= 1) { waypoints.poses.erase(std::prev(waypoints.poses.end())); } publish_waypoints_vis(); } else { // if -1.0 > height, end of input if (waypoints.poses.size() >= 1) { publish_waypoints_vis(); publish_waypoints(); }
After adding the line, I followed the steps in README, it says
"We use 3D Nav Goal to send a target for the drone to navigate. To use it, click the tool (shortcut keyboard 'g' may conflict with 2D Nav Goal), then press on left mouse button on a position in rviz, click right mouse button to start to drag it slide up or down for a targeting height (don't loose left button at this time). Finally you loose left mouse button and a target will be sent to the planner, done."
But there was no planned path in rviz, and it occurs quite often,have you ever experienced the same situation?
I set the 3D goal using the 3D goal button in rviz. It is set but after that, there is no planning being done. Instead, I am getting this error. Can you help me resolve it?
3D Goal Set [ INFO] [1596520725.637016470]: Setting goal: Frame:map, Position(-17.302, -16.764, 0.960), Orientation(0.000, 0.000, 0.000, 1.000) = Angle: 0.000
QSpiApplication::keyEventError "org.freedesktop.DBus.Error.NoReply" "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."