Hello, I have a problem with navigation in rviz. I have a model P3dx, I want to set goal on the map and my model have to move to this point. I am newbie in ROS, and tutorials don't hel me :/
I use Ubuntu 18.04 and ROS Melodic
I describe, what I done.
1. I done a map thanks gmapping. I have my map in .yaml and png.
2. Run the map - `rosrun map_server map_server src/PioneerModel/map.yaml`
3. I Open rviz and load the map on topic `/map`
4. Open node move_base and amcl `rosrun move_base move_base / rosrun amcl amcl`
After open amcl I got a warning:
[ WARN] [1557425810.906842985, 3433.961000000]: No laser scan received (and thus no pose updates have been published) for 3433.961000 seconds. Verify that data is being published on the /scan topic.
In rviz I can't load laserscan - error:
Transform [sender=unknown_publisher]
For frame [lms100]: No transform to fixed frame [map]. TF error: [Lookup would require extrapolation into the future. Requested time 4097.345000000 but the latest data is at time 2376.773000000, when looking up transform from frame [lms100] to frame [map]]
I tried to open my navigation node:
#include
#include
#include
typedef actionlib::SimpleActionClient MoveBaseClient;
int main(int argc, char **argv)
{
ros::init(argc, argv, "navigation_goals");
MoveBaseClient ac("move_base", true);
while (!ac.waitForServer(ros::Duration(5.0)))
{
ROS_INFO("Waiting for the move_base action server");
}
move_base_msgs::MoveBaseGoal goal;
goal.target_pose.header.frame_id = "map";
goal.target_pose.header.stamp = ros::Time::now();
goal.target_pose.pose.position.x = 9.8;
goal.target_pose.pose.position.y = -16.8;
goal.target_pose.pose.orientation.w = 1.0;
ROS_INFO("Sending goal: base");
ac.sendGoal(goal);
ac.waitForResult();
if (ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED)
ROS_INFO("You have arrived to the charging base");
else
{
ROS_INFO("The base failed for some reason");
}
return 0;
}
But I only have **Waiting for the move_base action server**
I know, that better is use launch file, but now, I want to move my model, next I will be "cleaning".
I Think that error is from load map.yaml on topic /map, but my knowledge about ROS is low and I can't handle with it :/
Thanks in advance!
↧