Comments (7)
I problem occurs because the goal pose is added to the global_path at the end of the example code. The pose, which is given by the user, contains the wrong time stamp.
To fix it, just comment on the line.
// global_path.poses.push_back(goal);
I also comment on the lines
// pose.header.stamp = clock_->now();
// pose.header.frame_id = global_frame_;
because I don't think the time stamp is needed in this exercise.
The NAV2 seems fragile at this point. I understand that the robot needs to move to a certain place at a certain time in some mission. So, it is completely necessary to add a timestamp for a plain. However, if the timing information is not right, or it contains no timing information, the NAV2 should just give a warning and adapt it.
from navigation2_tutorials.
Use sim time is inconsistently set.
from navigation2_tutorials.
Hi @SteveMacenski
Although I was over-writing the use_sim_time
parameter value from the terminal, still I changed all the use_sim_time
values to true
and still the error remains the same.
from navigation2_tutorials.
Also when running the nav2_navfn_planner
and the smac_planner
there was no error and navigation executed perfectly.
Hence a conclusion can be made that the error is not due to the controller but due to the planner.
Currently I am using the nav2_dwb_controller
.
Also thanks for the quick response to the issue.
from navigation2_tutorials.
Hey @SteveMacenski , @shivaang12 ,
Any update or solution would be very helpful.
Thanks
from navigation2_tutorials.
Did you wrote the planner from the article or cloned from here https://github.com/ros-planning/navigation2_tutorials ?
from navigation2_tutorials.
Hey, @shivaang12 thanks for the reply.
I cloned it from here a1028c5.
https://github.com/ros-planning/navigation2_tutorials and a1028c5 are basically the same the only difference was that the master branch used weak pointers and the latter used shared pointers.
Any thoughts on why is this happening ??
bool transformPose(
const std::shared_ptr<tf2_ros::Buffer> tf,
const std::string frame,
const geometry_msgs::msg::PoseStamped & in_pose,
geometry_msgs::msg::PoseStamped & out_pose,
rclcpp::Duration & transform_tolerance
)
{
if (in_pose.header.frame_id == frame) {
out_pose = in_pose;
return true;
}
try {
tf->transform(in_pose, out_pose, frame);
return true;
} catch (tf2::ExtrapolationException & ex) {
auto transform = tf->lookupTransform(
frame,
in_pose.header.frame_id,
tf2::TimePointZero
);
if (
(rclcpp::Time(in_pose.header.stamp) - rclcpp::Time(transform.header.stamp)) >
transform_tolerance)
{
RCLCPP_ERROR(
rclcpp::get_logger("tf_help"),
"Transform data too old when converting from %s to %s",
in_pose.header.frame_id.c_str(),
frame.c_str()
);
RCLCPP_ERROR(
rclcpp::get_logger("tf_help"),
"Data time: %ds %uns, Transform time: %ds %uns",
in_pose.header.stamp.sec,
in_pose.header.stamp.nanosec,
transform.header.stamp.sec,
transform.header.stamp.nanosec
);
return false;
} else {
tf2::doTransform(in_pose, out_pose, transform);
return true;
}
} catch (tf2::TransformException & ex) {
RCLCPP_ERROR(
rclcpp::get_logger("tf_help"),
"Exception in transformPose: %s",
ex.what()
);
return false;
}
return false;
Because when I print the values in this loop inside the controller server, the values seem to be inside the tolerance range.
And the loop returns true
.
So the error is also not arising from here. Currently, I am unable to figure out from where the error is arising.
Thanks
from navigation2_tutorials.
Related Issues (20)
- Activating keepout and speed filter together. HOT 5
- Error Custom Costmap Plugin - [controller_server]: [follow_path] [ActionServer] Aborting handle HOT 1
- Robot still move although costmap is set to max
- (Nav2_gps_waypoint_follower) No such file or directory of some library HOT 1
- MPPI tutorial HOT 1
- nav2_gps_waypoint_follower_demo: mapviz error HOT 15
- interactive_waypoint_follower can not get robot_localization state HOT 6
- nav2_gps_waypoint_follower_demo does not work on ros2 humble!!! HOT 1
- rospack plugins --attrib=plugin XX HOT 1
- nav2_gps_waypoint_follower_demo does not work on ros2 humble???! HOT 36
- rviz2 not receiving map (tutorial example) HOT 14
- turtlebot3_gazebo dependecey missing in package.xml
- Error while building tutorial source HOT 2
- Some changes to facilitate real robot migration HOT 1
- package building error HOT 2
- please share some resource related to the modifications needed to be done for foxy ros2 HOT 1
- errors in building the package in ros2 rolling HOT 6
- WP "moves" on each field test on real robot HOT 2
- Navigating Using GPS Localization - MapViz error HOT 1
- GPS Yaw Issues. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation2_tutorials.