Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot store position values to make robot work autonomously and getting error with get path when i launch the file #1

Open
Haneesh07 opened this issue Sep 21, 2017 · 6 comments

Comments

@Haneesh07
Copy link

i am using irobot and was working on SLAM using gmapping, can someone help me how to save the waypoints in map so that my robot move autonomously by reading file which has stored positions in map. my map is the willow garage given in gazebo.
i am using these commands:
roscore
roslaunch gazebo_ros empty_world.launch
rosrun gazebo_ros spawn_model -file /home/h/catkin_ws/src/create/model-1_4.sdf -sdf -model create
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
rosrun tf static_transform_publisher args=0 0 0 0 0 0 /base_footprint /base_link 100
rosrun tf static_transform_publisher args=0 0 0 0 0 0 /base_link /base_laser 100
rviz
roslaunch gmapping slam_gmapping_myrob.launch
rosrun follow_waypoints follow_waypoints

errorwithwaypoint-getpath

@danielsnider
Copy link
Owner

danielsnider commented Sep 21, 2017 via email

@SeaFu
Copy link

SeaFu commented Dec 16, 2018

how can I give the goal coordinate on this code

@danielsnider
Copy link
Owner

@SeaFu Here's how to set goals. This is taken from the documentation.

http://wiki.ros.org/follow_waypoints#Usage

To set waypoints you can either publish a ROS PoseWithCovarianceStamped message to the /initialpose topic directly or use RViz’s tool "2D Pose Estimate" to click anywhere. To visualize the waypoints as pink arrows in RViz, configure RViz to display the topic /current_waypoints which is published by follow_waypoints and must be subscribed to in Rviz as a PoseAarray type.

To initiate waypoint following send a "path ready" message.

$ rostopic pub /path_ready std_msgs/Empty -1

To clear the waypoint queue send a "path reset" message.

$ rostopic pub /path_reset std_msgs/Empty -1

@SeaFu
Copy link

SeaFu commented Dec 24, 2018

@danielsnider Sorry,I'm not very clear, I want to give a sure x , y , and yaw.For example : I want to make my robot go to (x=3.1 , y=2.5) and yaw=1.57 ,where can I set this information

@danielsnider
Copy link
Owner

@SeaFu Ok, this is close to what you want. Sorry I haven't tested it. You might need to fix this:

rostopic pub /initialpose geometry_msgs/PoseWithCovarianceStamped ’{
header : { frame_id : "/map " } , pose: { pose : { position : { x :
43.658 , y : -79.379 , z : 1.57} } } }’ -1

This will set a waypoint. You can set multiple.

To start going to these waypoints you need to run

$ rostopic pub /path_ready std_msgs/Empty -1

If you only care about going to one goal at a time, you don't need this package and can just use the move_base package and publish to /move_base_simple/goal. Either way you need to have move_base setup and running for follow_waypoints to work.

@101Priyansh
Copy link

101Priyansh commented Dec 21, 2022

Hey, I tried the mentioned solution but for me after i publish a pose on initialpose and give the command for startjourney, but the robot doesn't move.
Can you please tell what am i missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants