Giter VIP home page Giter VIP logo

Comments (4)

altineller avatar altineller commented on May 28, 2024 1

Hi @DaniGarciaLopez

I have also solved the STATUS_ABORTED problem from the action server. I noticed a TF warning error from the navigation stack, and in the lines where we send the goal:

    # write command
    goal_msg = NavigateToPose.Goal()
    goal_msg.pose.pose.position.x = float(waypoint[0])
    goal_msg.pose.pose.position.y = float(waypoint[1])
    # goal_msg.pose.pose.orientation.w = 1.0

we also need to add: goal_msg.pose.header.frame = 'base_footprint'

Because the nav server in humble expects a frame. Once a frame in header is defined, the action server will not return status 6 any more.

from ros2_explorer.

DaniGarciaLopez avatar DaniGarciaLopez commented on May 28, 2024

Hi @altineller,

Nav2 recovery sever was renamed to behavior server from Galactic to Humble (check the migration guide). This repo doesn't do any changes to Nav2 so the fix should be pretty straight forward, just take a recent nav2 launch file and do the correct remappings to the turtlebot3.

Currently I don't have time to keep updating this repo, but if you want to open PR with the Humble corrections I will be happy to take a look!

from ros2_explorer.

altineller avatar altineller commented on May 28, 2024

Hello @DaniGarciaLopez

Using default navigation_launch from ros humble, I made it somehow work.

Wanderer mode works, I had to tune the speed - and distance_from_wall - to avoid crashing to wall. From reading your code I understand that wanderer is a simple random graph explorer, where each time an obstacle is detected, robot performs a turn, and decide to go in some other way. I have some questions though:

About wanderer:

The listener callback has the following statements:
self.forward_distance = msg.ranges[0]
self.left_distance = msg.ranges[90]
self.back_distance = msg.ranges[180]
self.right_distance = msg.ranges[270]
self.left_forward_distance = msg.ranges[45]
self.right_forward_distance = msg.ranges[315]

Here we just measure some points in different directions, but just one data point per angle? is that true?

The distance_from_wall is in meters, but at init we have self.forward_distance = 1000.0 - those are just initialized to a large number?

About discovery_server:

It makes a call to cartographer, and gets the occupancy grid, and decides where to move, then submits a goal to nav server.
My nav server works, and robot reaches points when given over rviz, but with the discoverer_server, it always fails with Goal failed with status: 6 - I have searched for this fail code but have not been able to find it. Could it be for example timeout?

Also, could you elaborate on the function of watchtower? Is this used when we are exploring a known map, and it gives the percentage of map exploration or some other testing function? Currently I am not using the watchtower as I am running it on my separate gazebo setup and only using the discoverer_server and manager.

Finally, I would be very interested in maintaining this package or a rewrite of it, I think I could do it with a little support.

Thanks for the good work.

Best Regards,
Can Altineller

from ros2_explorer.

DaniGarciaLopez avatar DaniGarciaLopez commented on May 28, 2024

Glad you made it work on humble!

From reading your code I understand that wanderer is a simple random graph explorer, where each time an obstacle is detected, robot performs a turn, and decide to go in some other way. I have some questions though:

Yes, wanderer mode measures the nearest obstacle and performs a random turn to avoid collision.

Here we just measure some points in different directions, but just one data point per angle? is that true?

You're right, it just measures one point per angle within the LaserScan range. Due to this project was aimed to run in simulation, this method was enough for us. For a real world robot, where you have noisy sensor, I would suggest changing those lines because the angle you're measuring might be an outlier. Maybe spliting the ranges field into 6 sets, filter out the outliers and get the closest distance per set.

The distance_from_wall is in meters, but at init we have self.forward_distance = 1000.0 - those are just initialized to a large number?

Yes, just a quick and dirty initialization to a large value.

My nav server works, and robot reaches points when given over rviz, but with the discoverer_server, it always fails with Goal failed with status: 6 - I have searched for this fail code but have not been able to find it. Could it be for example timeout?

The status code 6 stands for STATUS_ABORTED which means that the goal was terminated by the action server without an external request (source). It might be because of a timeout on the server, but without replicating the error I cannot give you further assitance

Also, could you elaborate on the function of watchtower? Is this used when we are exploring a known map, and it gives the percentage of map exploration or some other testing function?

The watchtower nodes compares the surface of the simulated map with the current map to send a signal to stop exploring when a certain threshold has been reached. It only makes sense to use it when you know in advance the size of your map or you only want to map a certain surface. To automatically stop the exploration you might want to use something like the watchtower or, for example, by the time spent in the exploration. Although is perfectly fine to manually stop the exploration, depends on your usecase.

Finally, I would be very interested in maintaining this package or a rewrite of it, I think I could do it with a little support.

Most of the values of this package are hardcoded and it would be necessary to refactor it to be easily applied to other robots and environments. If you feel like it, I'd be happy to look at your changes!

from ros2_explorer.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.