0
$\begingroup$

Rosanswers logo

I would like to write a Class Navi in Python that loads a known yaml map, runs amcl and move_base to move the TurtleBot to the goal. I know I can do it with rviz, but I want to do it using Python codes so I can incorporate them with other codes. There is a tutorial: http://ros.org/wiki/navigation/Tutorials/SendingSimpleGoals but the code is in C++ and it does not load the map and does not do localization and also is not tailor made for TurtleBot.

It will be best if someone already have such code. Otherwise I shall appreciate if you can teach me what do I need to import and how to call the libraries. Thank you very much for your help.


Originally posted by Chik on ROS Answers with karma: 229 on 2013-03-20

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think you are confusing a bit what should actually be in your Python node.

You should translate the C++ code into Python, which basically means having a single actionlib client that sends goals.

Localization, loading maps, etc, would not be in the Python node, but would rather run as separate nodes, typically started by a launch file.

Your launch file would most likely have an "include" of turtlebot_navigation/move_base.launch to get localization, planning, etc as well as launching your Python-based node which sends waypoints to move_base.

Finally, don't forget that you will likely need to send an "initial pose" to AMCL before you can go anywhere.


Originally posted by fergs with karma: 13902 on 2013-03-22

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Chik on 2013-03-22:
Thank you very much. I shall try that.

Comment by salma on 2013-04-18:
@fergs i have read the move_base code but i found that the goal message is (geometry_msg/PoseStamped) that require a position my Question is : Can i send a different goal message type ? say i want my robot to detect my Object then use move_base to plan and Go to it and detection publish a /re_ki

Comment by salma on 2013-04-18:
publish a /re_kinect/detection_results (re_kinect_object_detector/DetectionResult)

How can i link these two aspects detection result and object position ?

thanks ,

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.