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

Unable to publish to move_base

$
0
0
I am trying to stop the robot and this the code I have written in my program > ros::Publisher pub1 = > nh_->advertise> ("/move_base/cancel", 1000); >> actionlib_msgs::GoalID msg; >> msg.id = ""; >> ros::spinOnce(); >> pub1.publish(msg); But, the robot continues to move and I even checked by listening to the topic using the below command but found no response. > rostopic echo /move_base/cancel However, when I try to publish to the topic, directly from terminal, it works. > rostopic pub /move_base/cancel actionlib_msgs/GoalID -- {} and also listening to the topic > rostopic echo > /move_base/cancel gives the below message > stamp: secs: 0 nsecs: 0 > id: '' Any idea why this might happen? Node handle declaration: > class Door { > public: > Door(ros::NodeHandle* nh); > protected: > ros::NodeHandle *nh_; > }; >> Door::Door( ros::NodeHandle* nh ) { > nh_ = nh; > } > int main(int argc, char**argv) { > ros::init(argc, argv,"robot_navigation"); >> ros::NodeHandle nh; > ros::NodeHandle privateNode("~"); > Door door(&nh);

move_base not subscribing to "/odom"

$
0
0
I'm trying to set up move_base, with odometry provided by robot_localization. When I launch, however, move_base does not seem to subscribe to "odom" - the topic is not visible in `rqt_graph` and doesn't get listed by `rostopic list`. My understanding of move_base (and the nav stack) was that it should be trying to subscribe to "odom" by default. Would anyone be able to tell me where I've gone wrong? This is what the `rqt_graph` looks like: ![image description](/upfiles/15565224038680641.png) And this is what my .launch file looks like (note, I pretty much copied the .yaml configs from http://wiki.ros.org/navigation/Tutorials/RobotSetup): [true,true,true, true,true,true, true,true,true, true,true,true, true,true,true]

Problem with navigation move_base

$
0
0
Hello, I have a problem with navigation in rviz. I have a model P3dx, I want to set goal on the map and my model have to move to this point. I am newbie in ROS, and tutorials don't hel me :/ I use Ubuntu 18.04 and ROS Melodic I describe, what I done. 1. I done a map thanks gmapping. I have my map in .yaml and png. 2. Run the map - `rosrun map_server map_server src/PioneerModel/map.yaml` 3. I Open rviz and load the map on topic `/map` 4. Open node move_base and amcl `rosrun move_base move_base / rosrun amcl amcl` After open amcl I got a warning: [ WARN] [1557425810.906842985, 3433.961000000]: No laser scan received (and thus no pose updates have been published) for 3433.961000 seconds. Verify that data is being published on the /scan topic. In rviz I can't load laserscan - error: Transform [sender=unknown_publisher] For frame [lms100]: No transform to fixed frame [map]. TF error: [Lookup would require extrapolation into the future. Requested time 4097.345000000 but the latest data is at time 2376.773000000, when looking up transform from frame [lms100] to frame [map]] I tried to open my navigation node: #include #include #include typedef actionlib::SimpleActionClient MoveBaseClient; int main(int argc, char **argv) { ros::init(argc, argv, "navigation_goals"); MoveBaseClient ac("move_base", true); while (!ac.waitForServer(ros::Duration(5.0))) { ROS_INFO("Waiting for the move_base action server"); } move_base_msgs::MoveBaseGoal goal; goal.target_pose.header.frame_id = "map"; goal.target_pose.header.stamp = ros::Time::now(); goal.target_pose.pose.position.x = 9.8; goal.target_pose.pose.position.y = -16.8; goal.target_pose.pose.orientation.w = 1.0; ROS_INFO("Sending goal: base"); ac.sendGoal(goal); ac.waitForResult(); if (ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED) ROS_INFO("You have arrived to the charging base"); else { ROS_INFO("The base failed for some reason"); } return 0; } But I only have **Waiting for the move_base action server** I know, that better is use launch file, but now, I want to move my model, next I will be "cleaning". I Think that error is from load map.yaml on topic /map, but my knowledge about ROS is low and I can't handle with it :/ Thanks in advance!

what is the best way to connect ackermann steering with rviz?

$
0
0
Hello, I am building my own car-like robot. For the driving motor controller, I am using the SDC2130 from Roboteq. I have found this package on github called [roboteq_diff_driver](https://github.com/ecostech/roboteq_diff_driver) which is able to control two motors in a differential drive setup (subscribes to cmd_Vel, publishes to odom and broadcasts odom tf). I am trying to expand on this to include ackermann steering. **My setup:** *Driving*: modify the roboteq_diff_driver package to only listen to the linear velocity so the robot is only either going forward or backward *Steering*: I am using an arduino to control some [linear actuators](https://s3.amazonaws.com/actuonix/Actuonix+P16+Datasheet.pdf) to steer the wheels. I can subscribe to cmd_vel (more specficially, the angular velocity part) with the arduino and then control the linear actuators to meet the desired angular velocity based on ackermann geometry. So although arduino is steering the wheels correctly based on cmd_vel, I dont know how to connect this with rviz since all rviz sees is the odom tf published from the package, which in this case, is only going forward and backward. This is problematic because I am not able to use the navigation stack properly. **My question:** How do I feed steering information back in to rviz (Base_link frame) so that it considers steering? Would using an IMU solve this problem? I was thinking, am I able to use an IMU to obtain the yaw data and then use this data instead of calculating the yaw based on differential drive kinematics as demonstrated by the package (see code below) and send this information to base_link? Can someone let me know if I am on the right track or if there are any alternative way to combine steering with rviz? Below is the part of the package that handles odom publishing: void MainNode::odom_publish() { // determine delta time in seconds uint32_t nowtime = millis(); float dt = (float)DELTAT(nowtime,odom_last_time) / 1000.0; odom_last_time = nowtime; #ifdef _ODOM_DEBUG /* ROS_DEBUG("right: "); ROS_DEBUG(odom_encoder_right); ROS_DEBUG(" left: "); ROS_DEBUG(odom_encoder_left); ROS_DEBUG(" dt: "); ROS_DEBUG(dt); ROS_DEBUG(""); */ #endif // determine deltas of distance and angle float linear = ((float)odom_encoder_right / (float)encoder_cpr * wheel_circumference + (float)odom_encoder_left / (float)encoder_cpr * wheel_circumference) / 2.0; // float angular = ((float)odom_encoder_right / (float)encoder_cpr * wheel_circumference - (float)odom_encoder_left / (float)encoder_cpr * wheel_circumference) / track_width * -1.0; float angular = ((float)odom_encoder_right / (float)encoder_cpr * wheel_circumference - (float)odom_encoder_left / (float)encoder_cpr * wheel_circumference) / track_width; #ifdef _ODOM_DEBUG /* ROS_DEBUG("linear: "); ROS_DEBUG(linear); ROS_DEBUG(" angular: "); ROS_DEBUG(angular); ROS_DEBUG(""); */ #endif // Update odometry odom_x += linear * cos(odom_yaw); // m odom_y += linear * sin(odom_yaw); // m odom_yaw = NORMALIZE(odom_yaw + angular); // rad #ifdef _ODOM_DEBUG //ROS_DEBUG_STREAM( "odom x: " << odom_x << " y: " << odom_y << " yaw: " << odom_yaw ); #endif // Calculate velocities float vx = (odom_x - odom_last_x) / dt; float vy = (odom_y - odom_last_y) / dt; float vyaw = (odom_yaw - odom_last_yaw) / dt; #ifdef _ODOM_DEBUG //ROS_DEBUG_STREAM( "velocity vx: " << odom_x << " vy: " << odom_y << " vyaw: " << odom_yaw ); #endif odom_last_x = odom_x; odom_last_y = odom_y; odom_last_yaw = odom_yaw; #ifdef _ODOM_DEBUG /* ROS_DEBUG("vx: "); ROS_DEBUG(vx); ROS_DEBUG(" vy: "); ROS_DEBUG(vy); ROS_DEBUG(" vyaw: "); ROS_DEBUG(vyaw); ROS_DEBUG(""); */ #endif geometry_msgs::Quaternion quat = tf::createQuaternionMsgFromYaw(odom_yaw); if ( pub_odom_tf ) { tf_msg.header.seq++; tf_msg.header.stamp = ros::Time::now(); tf_msg.transform.translation.x = odom_x; tf_msg.transform.translation.y = odom_y; tf_msg.transform.translation.z = 0.0; tf_msg.transform.rotation = quat; odom_broadcaster.sendTransform(tf_msg); } odom_msg.header.seq++; odom_msg.header.stamp = ros::Time::now(); odom_msg.pose.pose.position.x = odom_x; odom_msg.pose.pose.position.y = odom_y; odom_msg.pose.pose.position.z = 0.0; odom_msg.pose.pose.orientation = quat; odom_msg.twist.twist.linear.x = vx; odom_msg.twist.twist.linear.y = vy; odom_msg.twist.twist.linear.z = 0.0; odom_msg.twist.twist.angular.x = 0.0; odom_msg.twist.twist.angular.y = 0.0; odom_msg.twist.twist.angular.z = vyaw; odom_pub.publish(odom_msg); }

Publishing to /move_base_simple/goal

$
0
0
Hello All, This is a fairly straightforward question, however I have not been able to find it so far. Could someone please tell me the terminal command to publish move_base_simple/goal. I know it is something like: rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped .......... Really appreciate it. Thank you Ammar

is it possible to add to the gmapping-generated map obstacles using GPS coordinates. Or any other messages expect LaserScan ?

$
0
0
i have an device that provides me GPS cordinates of ather boats, so i want to add them as obstacles in the gmapping map .

move_base receiving empty plan

$
0
0
I'm trying to write a global planner to use with move_base. I'm printing the path in the console and it looks good, but I'm getting a warn from move_base telling me the plan is empty, even though I'm checking in the end of makePlan that it isn't. This is the part of makePlan that adds the poses to the plan vector: if (bestPath.size() > 0){ for (int i = bestPath.size()-1; i >=0; i--){ GridCell current = bestPath[i]; GridCell previous; if (i != (bestPath.size()-1)) previous = bestPath[i + 1]; else previous = current; //Orient the bot towards target tf::Vector3 vectorToTarget; vectorToTarget.setValue(current.x - previous.x, current.y - previous.y, 0.0); float angle = atan2((double)vectorToTarget.y(), (double)vectorToTarget.x()); geometry_msgs::PoseStamped pose = goal; pose.pose.position.x = current.x; pose.pose.position.y = current.y; pose.pose.position.z = 0.0; pose.pose.orientation = tf::createQuaternionMsgFromYaw(angle); plan.push_back(pose); } ROS_DEBUG("Plan empty: %d", plan.empty()); return true; } And the warning I'm getting is: [WARN]: Received an empty transformed plan. Any help will be greatly appreciated.

Using teb_local_planner with via_points and obstacle avoidance

$
0
0
I'm using ROS Kinetic on a real 2-wheel differential drive bot. I would like to use move_base with Global Planner and TebLocalPlanner to navigate through a set of waypoints. For `teb_local_planner`, I am publishing a set of points as nav_msgs/Path on the topic `/via_points`. I have the default parameters of teb_local_planner set up with changes to include via_points, such as `weight_viapoints = 5` and `weight_obstacle = 50`. My goal is to use this combination of Global Planner and TEBLocalPlanner to navigate through a preferred set of viapoints, while being able to avoid obstacles. The problem I am facing is that it seems like the viapoints do not seem to affect the global planner at all, even when I apply higher values such as `weight_viapoints = 50`. As explained in the [tutorial](http://wiki.ros.org/teb_local_planner/Tutorials/Following%20the%20Global%20Plan%20%28Via-Points%29), I do not want to set that too high as I still require some obstacle avoidance behaviour. I'm able to echo the `/via_points` topic and see the points are being published once. What am I missing? Is there any other approach to achieving waypoint navigation *with* obstacle avoidance? Any help will be appreciated!

p3dx not moving to the goal

$
0
0
Hello, I have question. I set the goal for my p3dx and in move_base.launch I got a warns: [ WARN] [1559064696.964216030, 2184.557000000]: DWA planner failed to produce path. [ WARN] [1559064697.358021516, 2184.863000000]: Map update loop missed its desired rate of 4.0000Hz... the loop actually took 0.2750 seconds My model is rotating from time to time in one place I have strange local costmap: ![image description](https://imagizer.imageshack.com/v2/467x350q90/924/hw9jEE.jpg) When I expand the local costmap area, I only see a bigger gray square, I don't see "blue wall". On the other map, local costmap looks ok, but model still can't move to the goal E: Now I see that when I ran my move_base node I got a warning: [ WARN] [1559065706.986428070, 3063.460000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 3063.46 timeout was 0.1.

target_frame map does not exist

$
0
0
HI, I have a problem with, in my opinion, read map through move_base node. When I launch my move_base.launch I got a WARN: [ WARN] [1559215881.016792500, 588.765000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 588.765 timeout was 0.1. But next communicats are: [ INFO] [1559215882.172031593, 589.785000000]: Using plugin "static" [ INFO] [1559215882.193340817, 589.801000000]: Requesting the map... [ INFO] [1559215882.456086100, 590.027000000]: Resizing costmap to 4000 X 4000 at 0.050000 m/pix [ INFO] [1559215882.590548878, 590.134000000]: Received a 4000 X 4000 map at 0.050000 m/pix [ INFO] [1559215882.590664833, 590.135000000]: Subscribing to updates [ INFO] [1559215882.608805401, 590.144000000]: Using plugin "inflation" [ INFO] [1559215882.810460955, 590.298000000]: Using plugin "obstacles_laser" [ INFO] [1559215882.815282109, 590.302000000]: Subscribed to Topics: laser [ INFO] [1559215882.876871143, 590.351000000]: Using plugin "inflation" [ INFO] [1559215882.971461633, 590.425000000]: Created local_planner base_local_planner/TrajectoryPlannerROS [ INFO] [1559215882.990769389, 590.442000000]: Sim period is set to 0.05 [ INFO] [1559215883.263756661, 590.676000000]: Recovery behavior will clear layer obstacles [ INFO] [1559215883.278203387, 590.686000000]: Recovery behavior will clear layer obstacles [ INFO] [1559215883.503132378, 590.831000000]: odom received! In my map.yaml I have direct path to map.pgm I do not know if this is a problem or not because: - When I use DWAPlannerROS and send a goal in rviz, my model isn't moving, and move_base send a communicat: ***DWA planner failed to produce path*** - When I use TrajectoryPlannerROS and send a goal in rviz, my model is moving, but not to a goal just somewhere on the map and smoetimes appears communicat: ***[ WARN] [1559217281.143489606, 1767.469000000]: Map update loop missed its desired rate of 4.0000Hz... the loop actually took 0.2680 seconds*** I use p3dx model, on ROS Melodic, Ubuntu 18.04

How to use /poseupdate or /slam_out_pose from hector_mapping as /odom for base_local_planner

$
0
0
My aim is to implement autonomous navigation using hector_slam. I have an RPLidar, through which I get Laser scan, and I can see the real time position of the lidar in rViz. I need to know how can I use this information and serve it as odom to move_base, or base_local_planner to be precise. /odom is of type nav_msgs/odometry while /slam_out_pose is of type geometry_msgs/posestamped and /poseupdate is of type geometry_msgs/posewithcovariancestamped. I have read that hector_slam is a good approach in absence of odometry information. But could not find any source on how to implement it. Again, the answer to my specific question might not be the one I'm looking for. So please help me to implement autonomous navigation.

unable to set min_in_place_vel_theta more than 3.14

$
0
0
I have 50 kg differential drive robot which needs a considerable amount of torque to start turning in place, usually anglular.z of at least 10 rad/s. Using `rqt_reconfigure` I'm trying to set `min_in_place_vel_theta` incrementally and it all works up to a value of 3.14 which is exactly echoed in `cmd_vel`. But when the `min_in_place_vel_theta` become larger than 3.14, `cmd_vel` changes sign and decrements. Looks like some sort of harmonic function when incremented further with breakpoints at multiples of 3.14. I have a gif to illustrate the behavior, but not enough karma to publish it here.

2d navigation robot setup dependency

$
0
0
So I am doing a 2d navigation and am using [`create_autonomy` for irobot](https://github.com/AutonomyLab/create_autonomy) I am following [this tutorial](http://wiki.ros.org/action/fullsearch/navigation/Tutorials/RobotSetup?action=fullsearch&context=180&value=linkto%3A%22navigation%2FTutorials%2FRobotSetup%22) In it I need to create a package with dependency: my_tf_configuration_dep my_odom_configuration_dep my_sensor_configuration_dep if I am using `create_autonomy` package and `urg_node` package do I still need to create those dependency? If so how?

Send goal code

$
0
0
So I am writing a code that sends goal to robot then send another goal but it is not working Here is my code: #include #include #include #include #include "geometry_msgs/PoseWithCovarianceStamped.h" #include typedef actionlib::SimpleActionClient MoveBaseClient; float current_x,current_y; // current pose void poseCallBack(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg) { current_x = msg->pose.pose.position.x; current_y = msg->pose.pose.position.y; } int main(int argc, char** argv){ ros::init(argc, argv, "simple_navigation_goals"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("/amcl_pose", 1, poseCallBack); // subscribe to amcl_pose/current pose //tell the action client that we want to spin a thread by default MoveBaseClient ac("move_base", true); //wait for the action server to come up while(!ac.waitForServer(ros::Duration(5.0))){ ROS_INFO("Waiting for the move_base action server to come up"); } move_base_msgs::MoveBaseGoal goal; // x and y position, we want to go diagonal float xy_ar[3] = {0.01, 0.02, 0.03}; int index = 0; //we'll send a goal to the robot to move 1 meter forward goal.target_pose.header.frame_id = "base_link"; while(ros::ok()){ goal.target_pose.header.stamp = ros::Time::now(); goal.target_pose.pose.position.x = xy_ar[index]; goal.target_pose.pose.position.y = xy_ar[index]; // calculate the angle double x = xy_ar[index] - current_x; double y = xy_ar[index] - current_y; double theta = atan2(y,x); // convert angle to quarternion double radians = theta * (M_PI/180); tf::Quaternion quaternion; quaternion = tf::createQuaternionFromYaw(radians); geometry_msgs::Quaternion qMsg; tf::quaternionTFToMsg(quaternion, qMsg); // set quarternion to goal goal.target_pose.pose.orientation = qMsg; index++; if (index == 3) {index = 0;} ROS_INFO("Sending goal"); ac.sendGoal(goal); ac.waitForResult(); if(ac.getState() == actionlib::SimpleClientGoalState::SUCCEEDED) ROS_INFO("Hooray"); else ROS_INFO("The base failed to move forward 1 meter for some reason"); ros::spinOnce(); } return 0; } basically what I want to do is calculate the quaternion by using the current pose by subscribing to the amcl_pose topic then I use the current pose and the goal pose to calculate the quaternion and sendgoal. But it didn't work and said trajectory error. What did I do something wrong? Thank you!

2d-navigation-goal robot spinning even when disconnected

$
0
0
Here's my launch file: I did rosrun map_server map_server map so I didn't add map_server to the launch file. base_local: TrajectoryPlannerROS: max_vel_x: 0.45 min_vel_x: 0.1 max_vel_theta: 1.0 min_in_place_vel_theta: 0.4 acc_lim_theta: 3.2 acc_lim_x: 2.5 acc_lim_y: 2.5 holonomic_robot: true costmap: obstacle_range: 2.5 raytrace_range: 3.0 #footprint: [[x0, y0], [x1, y1], ... [xn, yn]] robot_radius: ir_of_robot inflation_radius: 0.4 observation_sources: laser_scan_sensor laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true} global_costmap: global_costmap: global_frame: /map robot_base_frame: base_link update_frequency: 5.0 static_map: true local_costmap: local_costmap: global_frame: odom robot_base_frame: base_link update_frequency: 5.0 publish_frequency: 2.0 static_map: true rolling_window: true width: 6.0 height: 6.0 resolution: 0.05 When I did the 2d navigation goal it moves like what I want and the map shows that also, but then it kept on spinning and won't stop. It gave me alot of this: [ WARN] [1560202477.002795121]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0742 seconds [ WARN] [1560202477.092615987]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.1140 seconds [ WARN] [1560202478.586816017]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0942 seconds [ WARN] [1560202478.686886942]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0943 seconds [ WARN] [1560202478.786992583]: Control loop missed its desired rate of 20.0000Hz... the loop actually took 0.0943 seconds I tried changing the control frequency to 3 and it's the same thing

How to debug a path planner plugin in move base? (Qt Creator)

$
0
0
Hello guys, I am developing a local planner at the moment and I want to debug it while it is running in move base. At the moment I am using **launch-prefix="gdb -ex run --args"** in the launch file for the move_base node and afterwards I am connecting via *Debug > Start Debugging > Attach to Running Application* and choose my move_base_node in the QtCreator. I have activated ptrace and my workspace is build as a debug build. In my planner I have several breakpoints set and I know that the methods are called (because I print a message when I go in and out) but the debugger never stops at a break points. I even build move base in my own catkin workspace but debugging does not work there too. Does anyone how to debug a path planner plugin in move_base? Thanks in advance! Best regards

range_sensor_layer creates a warning "Illegal bounds change, ... The offending layer is local_costmap/inflation_layer"

$
0
0
Hi, I am using ROS navigation stack (move_base) in a custom mobile robot. The robot uses a computer with Ubuntu 18.04.2 LTS and ROS Melodic (1.14.3). I am using a rgbd camera and a ultrasonic sensor. When I setup to use plugin **range_sensor_layer** a warning appears in navigation launch log. The warning is **"Illegal bounds change, ... The offending layer is local_costmap/inflation_layer".** Does anybody know why this warning appears? What means this warning? **When I disable the range_sensor_layer, the warning disappears.** The topic that receives the range_sensor data is working good. global_costmap_params.yaml: global_costmap: global_frame: map robot_base_frame: base_footprint update_frequency: 0.5 publish_frequency: 0.5 static_map: true plugins: - {name: static_layer, type: "costmap_2d::StaticLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} local_costmap_params.yaml: local_costmap: global_frame: odom robot_base_frame: base_footprint update_frequency: 2.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 4.0 height: 4.0 resolution: 0.025 origin_x: -2.0 origin_y: -2.0 plugins: - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} - {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} costmap_common_params.yaml: footprint: [[0.095, -0.202], [-0.095, -0.202], [-0.310, -0.165], [-0.310, 0.165], [-0.095, 0.202], [0.095, 0.202]] footprint_padding: 0.025 #layer definitions obstacle_layer: obstacle_range: 3.5 raytrace_range: 4.0 observation_sources: point_cloud_sensor point_cloud_sensor: { sensor_frame: camera_link, data_type: PointCloud2, topic: openni_points, expected_update_rate: 0.5, marking: true, clearing: true, min_obstacle_height: 0.0, max_obstacle_height: 2.0, origin_z: 0.0, z_resolution: 0.05, z_voxels: 40, publish_voxel_map: true } sonar_layer: ns: /robot/sensor/ topics: ['sonar_forward_left'] inflation_layer: inflation_radius: 1.20 cost_scaling_factor: 2.58 transform_tolerance: 1 controller_patience: 2.0 NavfnROS: allow_unknown: true recovery_behaviors: [ {name: conservative_clear, type: clear_costmap_recovery/ClearCostmapRecovery}, {name: aggressive_clear, type: clear_costmap_recovery/ClearCostmapRecovery} ] conservative_clear: reset_distance: 3.00 aggressive_clear: reset_distance: 5.00 Log of my navigation launch with the warning: (partial) ... [ INFO] [1560447863.203341245]: Using plugin "static_layer" [ INFO] [1560447863.210058377]: Requesting the map... [ INFO] [1560447863.412339590]: Resizing costmap to 279 X 208 at 0.050000 m/pix [ INFO] [1560447863.512279360]: Received a 279 X 208 map at 0.050000 m/pix [ INFO] [1560447863.515405260]: Using plugin "inflation_layer" [ INFO] [1560447863.559205866]: Using plugin "obstacle_layer" [ INFO] [1560447863.560737803]: Subscribed to Topics: point_cloud_sensor [ INFO] [1560447863.597831479]: Using plugin "sonar_layer" [ INFO] [1560447863.601549444]: local_costmap/sonar_layer: ALL as input_sensor_type given [ INFO] [1560447863.605397302]: RangeSensorLayer: subscribed to topic /robot/sensor/sonar_forward_left [ INFO] [1560447863.630871186]: Approximate time sync = true [ INFO] [1560447863.652196595]: Using plugin "inflation_layer" [ WARN] [1560447863.712530171]: Illegal bounds change, was [tl: (-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000), br: (179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)], but is now [tl: (-340282346638528859811704183484516925440.000000, -340282346638528859811704183484516925440.000000), br: (340282346638528859811704183484516925440.000000, 340282346638528859811704183484516925440.000000)]. The offending layer is local_costmap/inflation_layer [ INFO] [1560447863.724870485]: Created local_planner base_local_planner/TrajectoryPlannerROS [ INFO] [1560447863.736285311]: Sim period is set to 0.20 ... I can navigate with the robot regardless of the warning message. But **when I comment the line of range_sensor_layer plugin in local_costmap_params.yaml, the warning is not shown.** local_costmap_params.yaml (with no warning): ... plugins: - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} #- {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

Error with range_sensor_layer. move_base node dies when a sensor_msgs/Range is published

$
0
0
Hi, I am trying to setup a **range_sensor_layer** to use an **ultrasonic sensor on the navigation stack**. I am using move_base in a custom mobile robot. The robot uses a computer with Ubuntu 18.04.2 LTS and ROS Melodic (1.14.3). I am using one RGB-D camera and an ultrasonic sensor. First I launch the navigation **without publishing sensor_msgs/Range on its topic**. Then I can navigate without the ultrasonic data. **When I launch the node that publishes the Range data, the move_base node dies.** Can anybody help me to configure correctly the range_sensor_layer? Following are my configuration files: global_costmap_params.yaml global_costmap: global_frame: map robot_base_frame: base_footprint update_frequency: 0.5 publish_frequency: 0.5 static_map: true plugins: - {name: static_layer, type: "costmap_2d::StaticLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} local_costmap_param.yaml local_costmap: global_frame: odom robot_base_frame: base_footprint update_frequency: 2.0 publish_frequency: 2.0 static_map: false rolling_window: true width: 4.0 height: 4.0 resolution: 0.025 origin_x: -2.0 origin_y: -2.0 plugins: - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"} - {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"} - {name: inflation_layer, type: "costmap_2d::InflationLayer"} costmap_common_params.yaml footprint: [[0.095, -0.202], [-0.095, -0.202], [-0.310, -0.165], [-0.310, 0.165], [-0.095, 0.202], [0.095, 0.202]] footprint_padding: 0.025 #layer definitions obstacle_layer: obstacle_range: 3.5 raytrace_range: 4.0 observation_sources: point_cloud_sensor point_cloud_sensor: { sensor_frame: camera_link, data_type: PointCloud2, topic: openni_points, expected_update_rate: 0.5, marking: true, clearing: true, min_obstacle_height: 0.0, max_obstacle_height: 2.0, origin_z: 0.0, z_resolution: 0.05, z_voxels: 40, publish_voxel_map: true } sonar_layer: ns: /robot/sensor/ topics: ['sonar_forward_left'] inflation_layer: inflation_radius: 1.20 cost_scaling_factor: 2.58 transform_tolerance: 1 controller_patience: 2.0 NavfnROS: allow_unknown: true recovery_behaviors: [ {name: conservative_clear, type: clear_costmap_recovery/ClearCostmapRecovery}, {name: aggressive_clear, type: clear_costmap_recovery/ClearCostmapRecovery} ] conservative_clear: reset_distance: 3.00 aggressive_clear: reset_distance: 5.00 The navigation launch log (working good) without publishing on sensor_msgs/Range Topic: ... [ INFO] [1560451022.672595882]: Using plugin "static_layer" [ INFO] [1560451022.678838847]: Requesting the map... [ INFO] [1560451022.881123086]: Resizing costmap to 279 X 208 at 0.050000 m/pix [ INFO] [1560451022.981045216]: Received a 279 X 208 map at 0.050000 m/pix [ INFO] [1560451022.983909307]: Using plugin "inflation_layer" [ INFO] [1560451023.023428562]: Using plugin "obstacle_layer" [ INFO] [1560451023.024910763]: Subscribed to Topics: point_cloud_sensor [ INFO] [1560451023.049016230]: Using plugin "sonar_layer" [ INFO] [1560451023.051504866]: local_costmap/sonar_layer: ALL as input_sensor_type given [ INFO] [1560451023.053644089]: RangeSensorLayer: subscribed to topic /robot/sensor/sonar_forward_left [ INFO] [1560451023.065115576]: Using plugin "inflation_layer" [ INFO] [1560451023.111015732]: Created local_planner base_local_planner/TrajectoryPlannerROS [ INFO] [1560451023.126600417]: Sim period is set to 0.20 [ INFO] [1560451023.254282343]: Approximate time sync = true [ERROR] [1560451023.620386435]: obstacles_detection: Parameter "min_cluster_size" has moved from rtabmap_ros to rtabmap library. Use parameter "Grid/MinClusterSize" instead. The value is still copied to new parameter name. [ERROR] [1560451023.621727209]: obstacles_detection: Parameter "max_obstacles_height" has moved from rtabmap_ros to rtabmap library. Use parameter "Grid/MaxObstacleHeight" instead. The value is still copied to new parameter name. [ WARN] [1560451025.131534696]: The openni_points observation buffer has not been updated for 2.10 seconds, and it should be updated every 0.50 seconds. [ WARN] [1560451025.131593002]: The openni_points observation buffer has not been updated for 2.10 seconds, and it should be updated every 0.50 seconds. [ WARN] [1560451025.131736352]: Illegal bounds change, was [tl: (-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000), br: (179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000, 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)], but is now [tl: (-340282346638528859811704183484516925440.000000, -340282346638528859811704183484516925440.000000), br: (340282346638528859811704183484516925440.000000, 340282346638528859811704183484516925440.000000)]. The offending layer is local_costmap/inflation_layer [ INFO] [1560451025.203243618]: Recovery behavior will clear layer obstacles [ INFO] [1560451025.236163764]: Recovery behavior will clear layer obstacles [ INFO] [1560451025.266917270]: odom received! [ WARN] [1560451109.575399918]: Messages of type 2 arrived out of order (will print only once) [ WARN] [1560451109.576543482]: Messages of type 0 arrived out of order (will print only once) Then, when I launch the node that publishes the ultrasonic sensor data on a sensor_msgs/Range Topic, the move_base dies on the same time. Here is the log: ... [ WARN] [1560451109.575399918]: Messages of type 2 arrived out of order (will print only once) [ WARN] [1560451109.576543482]: Messages of type 0 arrived out of order (will print only once) /opt/ros/melodic/lib/move_base/move_base: symbol lookup error: /opt/ros/melodic/lib//librange_sensor_layer.so: undefined symbol: _ZN3tf212getTimestampIN13geometry_msgs13PointStamped_ISaIvEEEEERKN3ros4TimeERKT_ [planner/move_base-1] process has died [pid 14104, exit code 127, cmd /opt/ros/melodic/lib/move_base/move_base openni_points:=/planner_cloud map:=/rtabmap/grid_map move_base_simple/goal:=/move_base_simple/goal cmd_vel:=/cmd_vel odom:=/rtabmap/odom __name:=move_base __log:=/home/nuc/.ros/log/22d3e9aa-8dfc-11e9-9c26-a11a53c44629/planner-move_base-1.log]. log file: /home/nuc/.ros/log/22d3e9aa-8dfc-11e9-9c26-a11a53c44629/planner-move_base-1*.log **I could not find the log file of this error.** The range sensor is working. rostopic echo /robot/sensor/sonar_forward_left ... header: seq: 34 stamp: secs: 1560451337 nsecs: 80173661 frame_id: "sonar_forward_left" radiation_type: 0 field_of_view: 0.457276314497 min_range: 0.0399999991059 max_range: 4.0 range: 1.55999994278 --- ...

/map not connecting to tf links for loading multiple robots in rviz

$
0
0
I am trying to load two robots in Gazebo and visualize them in Rviz to eventually do a leader-follower application. I believe I have the robots initialized in Gazebo correctly and mostly in Rviz, but am having trouble getting the /map topic to link up to either of the robots. I can teleop with the robots separately in Gazebo using their respective namespaces. I am simulating using a turtlebot3 waffle_pi. I'm thinking the problem has something to do with remapping from "map" to "/map" or in how my amcl node is called under the tf_prefixes for my two robots. From running `rosrun rqt_graph rqt_graph` I can see that both of my two robots are initialized with their respective connections to /tf and /gazebo. (would upload output image but not enough user points). From running `rosrun tf view_frames` I can see that both robots have root parents of "bot1_tf/odom" and "bot2_tf/odom" where "botX_tf" is the tf_prefix. The children connections seem to match output from running a single robot in Gazebo/Rviz. The only thing different seems to be that "/map" is the parent for "/odom" for the single robot, while there is no "/map" parent for the two robots. Upon loading Rviz I see a green check next to URDF making me thing Rviz is reading in the model correctly, though all other tf topics have errors. When I manually enter either tf_prefix in the "TF Prefix" field in Rviz under "RobotModel" I see errors saying "No transform from [tf_prefix/base_footprint] to [map]" and so on for the other tf topics (base_footprint, base_link, base_scan, camera_link, camera_rgb_frame, camera_rgb_optical_frame, caster_back_left_link, caster_back_right_link, imu_link, wheel_left_link, wheel_right_link). Running `rosnode list` results in the following: /bot1/amcl /bot1/move_base /bot1/robot_state_publisher /bot2/amcl /bot2/move_base /bot2/robot_state_publisher /gazebo /gazebo_gui /map_server /rosout /rviz Running `rostopic list` results in the following: /bot1/amcl_pose /bot1/camera/parameter_descriptions /bot1/camera/parameter_updates /bot1/camera/rgb/camera_info /bot1/camera/rgb/image_raw /bot1/camera/rgb/image_raw/compressed /bot1/camera/rgb/image_raw/compressed/parameter_descriptions /bot1/camera/rgb/image_raw/compressed/parameter_updates /bot1/camera/rgb/image_raw/compressedDepth /bot1/camera/rgb/image_raw/compressedDepth/parameter_descriptions /bot1/camera/rgb/image_raw/compressedDepth/parameter_updates /bot1/camera/rgb/image_raw/theora /bot1/camera/rgb/image_raw/theora/parameter_descriptions /bot1/camera/rgb/image_raw/theora/parameter_updates /bot1/cmd_vel /bot1/imu /bot1/initialpose /bot1/joint_states /bot1/move_base/current_goal /bot1/move_base/goal /bot1/move_base_simple/goal /bot1/odom /bot1/particlecloud /bot1/scan /bot2/amcl_pose /bot2/camera/parameter_descriptions /bot2/camera/parameter_updates /bot2/camera/rgb/camera_info /bot2/camera/rgb/image_raw /bot2/camera/rgb/image_raw/compressed /bot2/camera/rgb/image_raw/compressed/parameter_descriptions /bot2/camera/rgb/image_raw/compressed/parameter_updates /bot2/camera/rgb/image_raw/compressedDepth /bot2/camera/rgb/image_raw/compressedDepth/parameter_descriptions /bot2/camera/rgb/image_raw/compressedDepth/parameter_updates /bot2/camera/rgb/image_raw/theora /bot2/camera/rgb/image_raw/theora/parameter_descriptions /bot2/camera/rgb/image_raw/theora/parameter_updates /bot2/cmd_vel /bot2/imu /bot2/initialpose /bot2/joint_states /bot2/move_base/current_goal /bot2/move_base/goal /bot2/move_base_simple/goal /bot2/odom /bot2/particlecloud /bot2/scan /clock /gazebo/link_states /gazebo/model_states /gazebo/parameter_descriptions /gazebo/parameter_updates /gazebo/set_link_state /gazebo/set_model_state /initialpose /map /map_metadata /map_updates /move_base/DWAPlannerROS/global_plan /move_base/DWAPlannerROS/local_plan /move_base/NavfnROS/plan /move_base/global_costmap/costmap /move_base/global_costmap/costmap_updates /move_base/local_costmap/costmap /move_base/local_costmap/costmap_updates /move_base/local_costmap/footprint /move_base_simple/goal /particlecloud /rosout /rosout_agg /scan /tf /tf_static Investigating the /map topic by running `rostopic info /map` shows: Type: nav_msgs/OccupancyGrid Publishers: * /map_server (http://alex-UbuntuROS:40709/) Subscribers: * /rviz (http://alex-UbuntuROS:35671/) When I loaded a single robot for navigation into Rviz I saw that /move_base was also subscribed to /map, which is why I think there is an issue with /map and/or node connections to it. The error output I get from ROS is: (repeatedly printed in yellow) [ WARN] [1561024615.579003098, 3390.937000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist. canTransform: source_frame base_footprint does not exist.. canTransform returned after 0.1 timeout was 0.1. The files I'm using are as follows: --------------------------------------------------------------------------------------------------------- tutorial_custom_world_2bots.launch (load world and two robots into Gazebo) --------------------------------------------------------------------------------------------------------- tutorial_robots.launch (call launch file to initialize two robots) --------------------------------------------------------------------------------------------------------- tutorial_one_robot.launch (create a single robot, supposed to be called twice under different namespaces) --------------------------------------------------------------------------------------------------------- tutorial_navigation_2bots.launch (launch robots from Gazebo simulation to Rviz) --------------------------------------------------------------------------------------------------------- tutorial_move_base.launch (launch move_base for a robot, same as "normal" move_base but includes remapping from "map" to "/map") --------------------------------------------------------------------------------------------------------- amcl.launch (launch amcl.launch for robot, same as "normal" amcl.launch but includes remapping from "map" to "/map") Let me know if there is anything else I should provide - this is only my first post. Any help would be appreciated. Thank you

base local planner with dwa only send negative rotational velocity

$
0
0
Hi guys, I'm using move_base/base_local_planner with dwa parameter "true", and also I set the parameters "max_vel_theta: 0.1" and "min_vel_theta: -0.1", although the theta velocity range is from positive to negative, my robot still only performed clockwise rotational while navigating. However, the robot performed clockwise and counter-clockwise which is normal when reaching the goal (in-place rotation). I don't know why the controller only sends the negative(clockwise) velocity command while navigating.
Viewing all 667 articles
Browse latest View live


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