Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 667 articles
Browse latest View live

How to connect two huskies in the same tf?

$
0
0
So I have two huskies in gazebo simulation husky1 and husky2. I want to control husky1 with keyboard and husky2 would then follow husky1. I'm launching move_base_mapless.launch file and I'm using this http://wiki.ros.org/navigation/Tutorials/SendingSimpleGoals code to send husky2 to any location in the world but it doesn't stop moving and never reaches its goal. That's probably because husky1 and husky2 are not in the same frame or something. How do I connect them in the same frame using tf so when I move husky2 it knows where it has to go? here's my launch file for loading two huskies: move_base.launch file:

Unable to go straight ahead with move_base

$
0
0
Our robot is just turning on itself, whatever we ask it. It is heavy and has an important inertia. However, the turning direction keeps to be the same. We wonder why it does not go straight ahead. Here is the launch file: Here is `base_local_planner_params.yaml` : controller_frequency: 2.0 TrajectoryPlannerROS: # Robot Configuration Parameters max_vel_x: 0.06 min_vel_x: 0.01 # forward max_vel_theta: 0.02 min_vel_theta: -0.02 min_in_place_vel_theta: 0.01 acc_lim_theta: 0.005 acc_lim_x: 0.01 acc_lim_y: 0.0 holonomic_robot: false # Goal Tolerance Parameters yaw_goal_tolerance: 0.3 xy_goal_tolerance: 0.5 latch_xy_goal_tolerance: true meter_scoring: true Here is `costmap_common_params.yaml`: footprint: [[-0.65, -0.33], [-0.65, 0.33], [0.65, 0.33], [0.65, -0.33]] obstacle_range: 1.5 raytrace_range: 2.0 inflation_radius: 0.45 robot_base_frame: base_footprint width: 20 height: 20 resolution: 0.05 transform_tolerance: 0.8 observation_sources: scan scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true} Here is `global_costmap_param.yaml`: global_costmap: global_frame: /map robot_base_frame: /base_footprint update_frequency: 1.5 publish_frequency: 1.0 static_map: true transform_tolerance: 1.0 resolution: 0.1 Here is `local_costmap_param.yaml`: local_costmap: global_frame: odom robot_base_frame: base_footprint update_frequency: 1.5 publish_frequency: 1.0 static_map: false rolling_window: true width: 6.0 height: 6.0 Here is a [bagfile](https://drive.google.com/open?id=1YFhWHhP6ewiF8oQcunXVo3GOE1iNbUXD).

Costmap Laser Messages Dropped

$
0
0
I am attempting to run the move_base node in the ROS navigation stack package. I ran this in simulation on Gazebo and thought that it worked correctly but evidently not. I am running into an issue where things are not added to my local costmap from the LiDAR data even though it is visualize-able in Rviz. I have attached a [bag file](https://drive.google.com/file/d/1Icvcmlbfiu5IayUJMydyHYEXO6tPNAFP/view?usp=sharing) where I bring my robot into a known environment, set a pose in Rviz, and give a navigation goal. Note that the robot does not move because the motor driving node was not active. I am under the impression that the costmap should turn dark where there is an obstacle but mine is not behaving like that. The robot navigates without adding anything to the costmap. Below are the .yaml configuation files: base_local_planner: controller_frequency: 5.0 TrajectoryPlannerROS: max_vel_x: 1.0 min_vel_x: 0.0 max_vel_y: 0.0 min_vel_y: 0.0 max_vel_theta: 1.0 min_vel_theta: -1.0 min_in_place_vel_theta: 0.25 acc_lim_theta: 3.0 acc_lim_x: 3.0 acc_lim_y: 0 escape_vel: -2.0 holonomic_robot: false # Parameters for a simulation sim_time: 1.0 sim_granularity: 0.02 angular_sim_granularity: 0.02 dwa: true meter_scoring: true costmap_common_params obstacle_range: 0.25 # the maximum distance without updating the costmap raytrace_range: 1.5 # the range to which the robot will attempt to clear in front of itself footprint: [[-0.47, 0.47], [0.47, 0.47], [0.47, -0.47], [-0.47, -0.47]] # simple box configuration #robot_radius: ir_of_robot inflation_radius: 0.25 # 25 centemeters away from the robot - minimum distance away from an obsticle min_obstacle_height: 0.0 max_obstacle_height: 10.0 publish_frequency: 10.0 obstacle_layer: enabled: true obstacle_range: 3.0 raytrace_range: 5.0 max_obstacle_height: 20.0 # 2.0 m set to higher than flight height min_obstacle_height: -20.0 # set just below flight height inflation_radius: 0.7 track_unknown_space: true combination_method: 1 observation_sources: LiDAR_scan LiDAR_scan: {data_type: LaserScan, sensor_frame: /scan, clearing: true, marking: true, topic: /scan, inf_is_valid: false} global_costmap_params global_costmap: global_frame: /map # defines what coordinate frame the costmap should run in robot_base_frame: /base_footprint # the coordinate frame the robot should reference as the base of the bot update_frequency: 1.0 # (Hz) publish_frequency: 1.0 static_map: true # should the costmap initialize itself based on a map served by the map_server. # Put this to false if there is not a static map of if there is no map at all #resolution: 0.1 transform_tolerance: 10.0 #map_type: costmap plugins: - {name: static_layer, type: "costmap_2d::StaticLayer"} - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} #width: 200 #height: 200 #resolution: 0.5 local_costmap_params local_costmap: global_frame: /odom robot_base_frame: /base_footprint update_frequency: 5.0 # (Hz) publish_frequency: 2.0 # (Hz) static_map: false rolling_window: true # Setting to true means that the costmap will remain centered around the robot as it moves around the world width: 5.0 height: 5.0 resolution: 0.1 # These three set the width, height, and resolution of the costmap. Should (but do not have to be) the same as the static map transform_tolerance: 10.0 plugins: - {name: static_layer, type: "costmap_2d::StaticLayer"} - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} Any help is appreciated!

Outdoor navigation - following the road only with road map

$
0
0
Dear all, I have a following question: I'm trying to navigate our robot through the park, having only a road map from OpenStreetMap. The robot is equipped with IMU, GPS, odometry module and it can localize using robot_localization quite well. Next, our robot has LIDAR and camera, which can recognize the road. At this point I started implementing move_base because I couldn't find any other more suitable option. So we wrote a SW, which exports bitmap from the OpenStreetMap and tried to navigate robot through it. The robot marks curbs into local_costmap and tries to stay on the road while driving between the marks. Morover, I had to fuse the coordinates of the closest road to the localization to keep the robot from localizing off the road. Here is a picture in RViz: https://1drv.ms/u/s!Ao_K5fxbg3CwpU2xn1gl4M86chUJ Using this setting, the robot can drive about 50 meters before it stucks or rides off the road due to various reasons. But I think navigating this way is not effective and too complicated. I find the biggest limitation to be the raster global_costmap because i need to localize the robot on the road, follow the global_plan and find the best path fitting both - global_costmap and local_costmap. This is quite impossible when facing the problem of not 100% accurate localization, map and local_costmap marking. My best guess is to substitute global_costmap with some graph representation, where crossroads are nodes and roads are edges. In addition, there would be stored only an information about the road's orientation and that it should be sufficient. But move_base doesn't work this way. Could someone share an idea how to acomplish the mentioned task? Lukas

Local costmap with Laser builds partially

$
0
0
I am using move_base in kinetic devel and using the costmap_2d with the laser scan to build the local costmap. As can be seen in the image below, the local costmap builds only partially sometimes. Even though the laser measurements can see beyond the dimensions of the costmap ![Not building the complete map](/upfiles/15265691867020522.png) ![Certain region in middle of map missing](/upfiles/15265692214434637.png) Could someone help reach the cause of this? Why does this happen and how could it be solved?

move_base/feedback seems to be wrong

$
0
0
Hi, I'm trying to run the navigation stack on a Turtlebot 2. I started the robot with ```roslaunch turtlebot_bringup minimal.launch``` and then started the navigation with ```roslaunch turtlebot_navigation amcl_demo.launch map_file:=/path/to/my/map.yaml```. I have not edited the configuration files so everything (except my map) should be default. The Turtlebot is running Hydro. The behavior I see is that when I give a goal, the robot begins moving in that direction, but then passes the goal and continues to move in the same direction until I stop the navigation. The problem seems to be with the topic ```/move_base/feedback```. It is always incorrect. The poses published on ```/amcl_pose``` are correct, and the odometry values seem to be correct. Both the global path and the first local path look good. The problem is that the local path is updated with a new starting state based on ```/move_base/feedback```, and those values are always near ```(0,0,0)```, basically saying that the robot has not moved much even if the robot has moved several meters from the initial location. So the local path always begins near the initial location, causing the robot to pass the goal and keep driving until I manually kill the nodes. The transforms all look fine in Rviz. The msgs published on ```/move_base/feedback``` all say that the frame_id is ```/map``` (which is the fixed frame). The msgs published on ```/amcl_pose``` all say that they are relative to ```/map``` too, but they are correct whereas the msgs being published on ```move_base/feedback``` are not. The wiki for ```move_base``` describes the msgs on ```/move_base/feedback``` as "Feedback contains the current position of the base in the world" so I would expect them to be equal to the poses on ```/amcl_pose```. I have looked around the config files in ```turtlebot_navigation``` and cannot find anything that seems relevant to ```move_base/feedback```. However, this is my first time using the navigation stack so I may be overlooking something. Does anyone know what I can look/check for and/or what might be causing this issue? Any help is appreciated.

Costmap shows free space as obstacles

$
0
0
Hi everyone! I am trying to use navigation stack on quadcopter equipped with kinect sensor at Gazebo simulation. I am using grid_map topic of rtabmap_ros package as map for navigation of UAV which hovers at 1.5 m over ground. But global_costmap and local_costmap both show free space on proj_map as obstacles ([proj_map](https://drive.google.com/open?id=1YyllM2rQbt_oY-FTz9cQz773kt-lXzUL), [global_costmap](https://drive.google.com/open?id=1LRdps5-RMNQ_-UKA2Ig9dhHqxv7vjHh4)). How can I fix it? Costmap common params: footprint: [[-0.2,-0.2],[-0.2,0.2], [0.2, 0.2], [0.2,-0.2]] inflation_radius: 0.65 cost_scaling_factor: 10.0 obstacle_layer: obstacle_range: 5.5 raytrace_range: 6.0 max_obstacle_height: 0.7 track_unknown_space: true observation_sources: point_cloud_sensor point_cloud_sensor: { sensor_frame: quad/camera__link, data_type: PointCloud2, topic: /quad/camera_/depth/points, marking: true, clearing: true } Global costmap params: global_costmap: global_frame: /map robot_base_frame: /base_link update_frequency: 1.0 publish_frequency: 1.0 static_map: false plugins: - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"} Local costmap params: local_costmap: global_frame: /map robot_base_frame: /base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 5.0 height: 5.0 resolution: 0.02 tranform_tolerance: 0.5 planner_frequency: 1.0 planner_patiente: 5.0 plugins: - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}

Robot approaching another robot using move base

$
0
0
I have a simulation in gazebo with two husky robots husky1 and husky2. What I want to do is make husky2 approach husky1 which will be controlled by keyboard. I tried using husky's move_base_mapless_demo.launch when there's only one husky in the world and send simple goal with code. Husky moved to the right spot. However, when there are two huskies in the world and I do the same thing and try moving husky2 to any point, it would make a turn and then drive to infinity. How can I make it drive to correct point when there are two huskies in the world? Here's my code for sending simple goal #!/usr/bin/env python # license removed for brevity import rospy import actionlib from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal def movebase_client(): client = actionlib.SimpleActionClient('husky2/move_base',MoveBaseAction) client.wait_for_server() # sub_husky1 = rospy.Subscriber("/husky1_odom", Odometry, husky1Odom) goal = MoveBaseGoal() goal.target_pose.header.frame_id = "map" goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose.position.x = 5 goal.target_pose.pose.position.y = 5 goal.target_pose.pose.orientation.w = 1.0 client.send_goal(goal) wait = client.wait_for_result() if not wait: rospy.logerr("Action server not available!") rospy.signal_shutdown("Action server not available!") else: return client.get_result() if __name__ == '__main__': try: rospy.init_node('movebase_client_py') result = movebase_client() if result: rospy.loginfo("Goal execution done!") except rospy.ROSInterruptException: rospy.loginfo("Navigation test finished.") and here is my move_base.launch file

How to add new subscriber in move_base node ?

$
0
0
Hello, I have integrated listener.cpp subscriber (from ROS tutorials) into the move_base node. I started move_base node and after I started talker.cpp node. But it does not work. Following steps show my process, where I am doing wrong ? **in move_base.h** ros::Subscriber listen_; void listenCallback(const std_msgs::String::ConstPtr& msg); **in move_base.cpp** ros::NodeHandle listen_nh_; listen_= listen_nh_.subscribe("chatter", 1, boost::bind(&MoveBase::listenCallback, this, _1)); void MoveBase::listenCallback(const std_msgs::String::ConstPtr& msg) { ROS_INFO("I heard: [%s]", msg->data.c_str()); } So this is what I do. Do have any idea what my failure is or something forgetting ? thanks

How can send multiple goals with Action API?

$
0
0
Hi I send sequence of goals to move_base SimpleActionServer. But server just processes the first and last goals. Goals between first and last goals are dropped. In [API](http://docs.ros.org/kinetic/api/actionlib/html/classactionlib_1_1simple__action__server_1_1SimpleActionServer.html) , it says that: only one goal can have an active status at a time. Clearly this is the reason of that issue. But is there any solution for that problem or alternative server that can accept goals faster than SimpleActionServer? Note: - This issue is discussed [here](https://answers.ros.org/question/9776/action-server-with-more-than-one-action/) but solution is not so clear. (it is advised to use actionlib API directly, but how?) - This issue is discussed [here](https://answers.ros.org/question/210987/sending-a-sequence-of-goals-to-move_base/) but solution is not so clear. (it is advised to use Action API of move_base, but how?) Thanks

move_base actionlib client doesn't work in rospy

$
0
0
Hey, If I run `rtabmap_ros demo_turtlebot_mapping.launch simulation:= true localization:=true` and then send 2d nav goals from rviz it works just fine. However when I connect to the actionlib client and `send_goal` using the MoveBaseGoal msg, then the server never acts on it. Even though my client publishes the goal under `/move_base/goal` in the full MoveBaseActionGoal msg format. Any ideas? Thanks, Toby

How to set via-points through code?

$
0
0
The TEB local planner has a tutorial (http://wiki.ros.org/teb_local_planner/Tutorials/Following%20the%20Global%20Plan%20%28Via-Points%29) on setting via-points in Rviz, but it does not explain how to set them in code. Anyone know how I can do this?

move_base to use map published on a certain topic

$
0
0
Hello, I'm having trouble trying to make my `move_base` constantly subscribe to a certain topic to load current SLAM-made map. There are some related questions here like [this](https://answers.ros.org/question/10180/build-map-dynamically-in-slamnot-using-static-map/), [this](https://answers.ros.org/question/155091/move_base-without-map/), [this](https://answers.ros.org/question/49841/navigation-using-real-time-generate-map-without-a-known-map/) but none of them helped. I mean that I would like `move_base` node to update map it is using with the one that is published to a given topic and periodically updated. I'm using visual SLAM. I have PCL data but can't use it directly as I have to perform some space clearing operations. Ready to use map is published as a ROS message of type `nav_msgs/OccupancyGrid` and correctly visualized in rViz. What's problematic here is that I can successfully use `static_map` loaded from file but I have no idea how to use dynamically published map instead of direct sensor stream. Here are my current configuration files: global_costmap: global_frame: "map" robot_base_frame: "base_link" transform_tolerance: 20.0 update_frequency: 2.0 publish_frequency: 1.0 rolling_window: true always_send_full_costmap: true static_map: false map_type: costmap Local costmap: local_costmap: global_frame: "odom" robot_base_frame: "base_link" transform_tolerance: 10.0 update_frequency: 1.0 publish_frequency: 0.5 rolling_window: true always_send_full_costmap: true static_map: false map_type: costmap # ---- Following most likely replaced by static map layer width: 1.0 height: 1.0 resolution: 0.01 Common parameters: plugins: # - {name: static_map, type: "costmap_2d::StaticLayer"} - {name: inflation, type: "costmap_2d::InflationLayer"} - {name: sonar, type: "range_sensor_layer::RangeSensorLayer"} Static map layer: map_topic: "/map_topic" first_map_only: false So at the moment I don't use static map layer and everything loads correctly except that blank costmaps are published (global and local). No error is shown. Otherwise, if I enable static map layer, set global and local costmaps to use rolling window and non-static map `move_base` node is stuck at: [ INFO] [1528620968.885129620]: Using plugin "static_map" [ INFO] [1528620968.904921357]: Requesting the map... I'm sure that topic name is correct. In the [static map layer](http://wiki.ros.org/costmap_2d/hydro/staticmap) there is parameter defined `map_topic` and `first_map_only` but seem not to work as I expected. If I set global and local costmap's parameters as: static_map: true rolling_window: false and run `map_server` with appropriate file (previously saved map) everything works good. But it's not the way I would like to do it. Any tips are welcome.

How to put action client into move_base?

$
0
0
Hi Can some one explain me, how can I put MoveBaseActionClient into move_base node ? Thanks

Robot is not moving to goal

$
0
0
I have a simulation in gazebo with two husky robots. I launch move_base_mapless_demo.launch file so i can send goals to a robot. When I'm using simulation with one husky robot, it moves to correct spot, but when there are two husky robots then the robot never reaches its goal and it never stops. I don't use any map although i thought that is causing the problem... I use this command to move robot to a goal rostopic pub /husky2/move_base_simple/goal geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "/husky1_tf/odom"}, pose: {position: {x: 1.0, y: 0.0, z: 0.0}, orientation: {w: 1.0}}}' this is my move_base launch file i believe the problem is in frames but I don't quiet understand what should I do to fix the problem. Basically, I want husky2 to go to a goal when there's other robot. frames.pdf looks good to me. map -> husky1_tf/odom -> husky1_tf/base_link map -> husky2_tf/odom -> husky2_tf/base_link

online planner with move_base - checking for footprint legality

$
0
0
I am trying to build an online planner that interacts with move_base by iteratively sending next goals as a service call to move_base. Therefore I would like to find ways to check for footprint legality. 1. One way is to subscribe to the footprint and the global costmap topics and then construct the list of cells within the footprint and then check all of them for obstacle using the costmap. 2. However the world_model allows to check for footprint legality directly as is being done in the carrot planner. How should the world model be constructed in this case? Or is there a better way to do so? Thanks

Nav Stack: one map for AMCL and one for move_base?

$
0
0
I need to run AMCL and Movebase from two different maps as there are many locations in an outdoor map that the robot would get stuck in gravel, rocks, bushes, etc that are below the level of the laser scanner. AMCL needs to use the raw map from gmapping, but move_base should use a map that I have manually added exclusion zones to for path planning. I've made some progress setting up two different map servers and remapping output of one to planner_map. I changed Global Planner YAML file to watch new map for move_base (I think this is correct, please tell me if not) global_costmap: global_frame: /planner_map robot_base_frame: base_link update_frequency: 3.0 static_map: true And now realize I need to have AMCL use one map for location but output the transform to the other map for use by move_base. [ WARN] [1529387937.537219284]: Timed out waiting for transform from base_link to planner_map to become available before running costmap, tf error: canTransform: target_frame planner_map does not exist. canTransform: source_frame base_link does not exist.. canTransform returned after 0.100704 timeout was 0.1. Wondering also if I need to double up on the ODOM base_link transforms to make this work. I found this thread on an external site dealing with this topic but the conversation doesn't cover these points and it's 8 years old so unknown how relevant it is. http://ros-users.122217.n3.nabble.com/Different-maps-for-navigation-and-path-planning-td1426132.html So I have four questions: 1 - How do I get AMCL to output transform to the planner_map in addition to the regular map? 2 - Will I have to duplicate ODOM to base_link transform with different name to get transform from AMCL? 3 - Is the modification in the global costmap yaml lfile the correct way to get move_base to use the secondary map? 4 - Is there an easier way to do this that you can point me to? Thanks in advance for your help. Using ROS Kinetic, Ubuntu 14.04

How to use pose for `move_base` to produce `cmd_vel`?

$
0
0
From the Wiki page of `move_base`, it seems that `move_base` obtains the pose estimation of a robot by a `tf` from `map` to `odom`, which is often published by `amcl`. However, in my application, I use a motion predictor to predict the future pose of the robot, and I want to use that *future pose as a basis for my `move_base`* computation (i.e. use the future pose instead of the current pose estimated by `amcl`). The message of my future pose is `geometry_msgs/PoseWithCovarianceStamped`, which is not a tf. How do I control the robot using `geometry_msgs/PoseWithCovarianceStamped` instead of tf for `move_base`? There are several solutions that I have tried: 1. One alternative is to replace the tf publisher in `amcl` with a custom tf publisher (from `map` to `odom`) using the future pose, but it causes the laser scan misaligned. 2. Another alternative is to keep the original `amcl` code unchanged, and write a tf publisher (from `map` to `odom_future` frame) using the future pose . This approach seems realistic, because it does not affect localization and sensor readings, but I could not find the pieces of code in `move_base` to expect the frame `odom_future` instead of `odom`. Could somebody provide me some guidance?

Implement obstacle avoidance methods and local navigation (move_base)

$
0
0
Hello, I would like to implement obstacle avoidance methods in Turtlebot2 (Velocity obstacles, VFH+. APF,...). And I do not know if I have to use pluginlib and do as D. Lu did. That is, implement the interface named nav_core::BaseLocalPlanner and do planning in computeVelocityCommands method [1]. Or maybe, it requires to do something else such as modifying costmap_2d [2], add PoseStamped ? So, does somebody may advise me on what should I do first, since I am a beginner using ROS ? [1] https://github.com/DLu/simple_local_planner [2] http://wiki.ros.org/costmap_2d

Unable to move robot using 2d nav goal

$
0
0
I will list all my steps clearly, including my git repo. If anyone needs anything, feel free to tell me. 1)Run RosAria on the robot pc. Connects well, publishes odom->base_link transforms well and good. 2) On the piggyback laptop, roslaunch freenect_launch freenect.launch depth_registration:=true. For my kinect, of course 3)rosrun depthimage_to_laserscan depthimage_to_laserscan image:=/camera/depth_registered/image_raw. For fake laser data 4)roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete-dbs-on-start" rviz:=true rtabviz:=false, gives me map->odom transform. 5) Run teleop in the remote pc. I generate a 2-d map in rtabmap, save it on map_server 6)Roslaunch p3dx_navigation move_base_rosaria.launch. open rviz, 2d point estimate works well. Not perfect, but not too bad either. 7)Set a goal using 2d Nav goal. Here i get all sorts of errors as follows [ERROR] [1529929504.112153804]: Aborting because a valid plan could not be found. Even after executing all recovery behaviors [ WARN] [1529929504.112746594]: Map update loop missed its desired rate of 2.5000Hz... the loop actually took 0.5540 seconds [ WARN] [1529929514.661682065]: Costmap2DROS transform timeout. Current time: 1529929514.6616, global_pose stamp: 1529929514.3319, tolerance: 0.3000 [ WARN] [1529929514.707078373]: Could not get robot pose, cancelling reconfiguration. If anyone can help me it would be a godsend. Here is the link to my github repo. https://github.com/RiddhimanRaut/NewRepo
Viewing all 667 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>