2019-09-19 07:27:09 -0500 received badge ● Notable Question (source) 2019-09-07 01:00:23 -0500 asked a question How to know if robot has moved one meter using odometry How to know if robot has moved one meter using odometry I'm working with ROS Melodic and Gazebo 9.9.0 on Ubuntu 18.04.2 2019-09-06 09:07:14 -0500 received badge ● Notable Question (source) 2019-09-04 20:59:49 -0500 received badge ● Notable Question (source) 2019-09-04 07:33:59 -0500 marked best answer Data structure to store a map while doing it with SLAM I'm studying robotics at the university and I have to implement on my own SLAM algorithm. To do it I will use ROS Melodic, Gazebo 9.1.0 and C++. I have a doubt about what data structure I have to use to store the map (and what I'm going to store it, but this is another story). I have thought to represent the map as a 2D grid and robot's start location is (0,0). But I don't know where exactly is the robot on the world that I have to map. It could be at the top left corner, at the middle of the world, or in any other unknonw location inside the world. Each cell of the grid will be 1x1 meters. I will use a laser to know where are the obstacles. Using current robot's location, I will set to 1 on all the cells that represent an obstacle. For example, it laser detects an obstacle at 2 meters in front of the robot, I will set to 1 the cell at (0,2). Using a vector, or a 2D matrix, here is a problem, because, vector and matrices indices start at 0, and there could be more room behind the robot to map. And that room will have an obstacle at (-1,-3). On this data structure, I will need to store the cells that have an obstacle and the cells that I know they are free. Which kind of data structure will I have to use? UPDATE: The process to store the map will be the following: Robot starts at (0,0) cell. It will detect the obstacles and store them in the map. Robot moves to (1,0) cell. And again, detect and store the obstacles in the map. Continue moving to free cells and storing the obstacles it founds. the robot will detect the obstacles that are in front of him and to the sides, but never behind it. My problem comes when the robot detects an obstacle on a negative cell (like (0,-1). I don't know how to store that obstacle if I have previously stored only the obstacle on "positive" cells. So, maybe the "offset", it is not a solution here (or maybe I'm wrong). 2019-09-03 00:46:22 -0500 asked a question Make a iteratively using laser data Make a iteratively using laser data I'm using ROS Melodic and Gazebo 9. I'm implementing SLAM algorithm using C++ and I 2019-08-28 13:22:42 -0500 received badge ● Popular Question (source) 2019-08-27 08:35:05 -0500 asked a question Data structure to store a map while doing it with SLAM Data structure to store a map while doing it with SLAM I'm studying robotics at the university and I have to implement o 2019-08-26 05:13:53 -0500 received badge ● Notable Question (source) 2019-08-13 17:59:13 -0500 received badge ● Popular Question (source) 2019-07-23 05:14:27 -0500 received badge ● Popular Question (source) 2019-07-23 00:34:28 -0500 marked best answer Two different nodes getting odometry messages I'm using C++ to program two nodes on ROS melodic with Gazebo 9.9.0 running on an Ubuntu 18.04.2 LTS. I'm learning ROS and I have to do the same: move a robot, Pioneer 2DX, to make a map using Odometry. Yes, I know, there are a lot of better ways to do a map, but I'm learning and this is an exercise that I have to do at the university. I've thought to use two nodes: One to store odometry data. Other to move the robot using keyboard. My problem, or doubt, is that I need to use Odometry data on both. In the second one, because if I have to rotate the robot, I need to know robot's heading. I'm using ros::spinOnce(); to process callbacks waiting. My question is: if one node read a Odometry message, that message read from one node, will it be available for the other node? Or maybe, I will lose that message. I've also thought to use one node to store odometry data and also to move the robot if calling ros::spinOnce(); will make me to lose the message. 2019-07-22 11:37:23 -0500 received badge ● Popular Question (source) 2019-07-22 02:29:15 -0500 commented answer Two different nodes getting odometry messages Great!!! Thanks a lot. 2019-07-22 02:19:34 -0500 edited question Two different nodes getting odometry messages Two different nodes getting odometry messages I'm using C++ to program two nodes on ROS melodic with Gazebo 9.9.0 runnin 2019-07-22 02:19:34 -0500 received badge ● Associate Editor (source) 2019-07-22 02:08:28 -0500 marked best answer Different between private node handler and not private I'm using ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I've been reading this: http://wiki.ros.org/roscpp/Overview/N..., but I don't understand what is (or are) the different between this two declarations: ros::NodeHandle n;  And ros::NodeHandle n("~");  What are the different between a private and a not private node handler? 2019-07-22 02:07:51 -0500 received badge ● Notable Question (source) 2019-07-22 02:07:26 -0500 asked a question Two different nodes getting odometry messages Two different nodes getting odometry messages I'm using C++ to program two nodes on ROS melodic with Gazebo 9.9.0 runnin 2019-07-19 05:31:03 -0500 received badge ● Popular Question (source) 2019-07-19 03:30:49 -0500 received badge ● Popular Question (source) 2019-07-18 11:37:51 -0500 received badge ● Famous Question (source) 2019-07-18 10:29:48 -0500 asked a question Different between private node handler and not private Different between private node handler and not private I'm using ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. 2019-07-18 10:21:46 -0500 received badge ● Famous Question (source) 2019-07-18 10:21:32 -0500 received badge ● Notable Question (source) 2019-07-18 10:10:08 -0500 commented question Command line boolean parameters to ros node I was going to ask you something, but you never answer my questions. 2019-07-18 10:01:19 -0500 asked a question Command line boolean parameters to ros node Command line boolean parameters to ros node I'm working with ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I w 2019-07-15 08:57:12 -0500 received badge ● Notable Question (source) 2019-07-15 07:11:48 -0500 received badge ● Notable Question (source) 2019-07-15 07:11:48 -0500 received badge ● Famous Question (source) 2019-07-15 04:15:33 -0500 commented answer Avoid to hit corners using A* algorithm Thanks for your answer. Where can I find those projects? Or, what are their names? Thanks a lot! 2019-07-15 03:32:45 -0500 commented question Avoid to hit corners using A* algorithm No local planner. I have implemented A*, and using Odometry and cmd_vel topics to move the robot. 2019-07-15 03:30:51 -0500 received badge ● Popular Question (source) 2019-07-13 09:28:33 -0500 edited question Avoid to hit corners using A* algorithm Avoid to hit corners using A* algorithm I'm using ROS melodic with Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I'm implement 2019-07-13 01:25:17 -0500 asked a question Avoid to hit corners using A* algorithm Avoid to hit corners using A* algorithm I'm using ROS melodic with Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I'm implement 2019-07-12 08:10:09 -0500 received badge ● Famous Question (source) 2019-07-12 08:10:09 -0500 received badge ● Notable Question (source) 2019-07-11 09:30:10 -0500 received badge ● Notable Question (source) 2019-07-10 02:46:31 -0500 marked best answer How to create a geometry_msgs::Point? I'm using ROS melodic. I'm trying this C++ code: #include "ros/ros.h" #include "geometry_msgs/Twist.h" #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" #include "tf/LinearMath/Matrix3x3.h" #include "nav_msgs/Odometry.h" #include #include #include #include // ... More code geometry_msgs::Point p;  But I get the following error message: no instance of constructor "geometry_msgs::Point_::Point_ [with ContainerAllocator=std::allocator]" matches the argument list -- argument types are: (double, double)  What am I doing wrong? 2019-07-10 00:27:22 -0500 received badge ● Popular Question (source) 2019-07-09 04:47:24 -0500 commented question How can I set cmd_vel_timeout for diff_drive_controller? How can I set that parameter in configuration file? 2019-07-09 04:43:10 -0500 commented question How can I set cmd_vel_timeout for diff_drive_controller? @gvdhoorn Thanks. If you know that, you would know how to do it. How can I set commands time out? Thanks. 2019-07-09 03:53:46 -0500 edited question How can I set cmd_vel_timeout for diff_drive_controller? How can I set cmd_vel_timeout for diff_drive_controller? I'm using ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS 2019-07-09 03:43:14 -0500 asked a question How can I set cmd_vel_timeout for diff_drive_controller? How can I set cmd_vel_timeout for diff_drive_controller? I'm using ROS melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS 2019-07-09 02:40:50 -0500 commented question Send Twist message on Ctrl.+C Thanks. How can I do that? 2019-07-09 02:13:24 -0500 commented question Send Twist message on Ctrl.+C The idea is to send an "all-zeros" Twist message but, I don't have and I don't know what is a built-in command time-out. 2019-07-09 02:03:53 -0500 received badge ● Famous Question (source) 2019-07-09 02:01:07 -0500 asked a question Send Twist message on Ctrl.+C Send Twist message on Ctrl.+C I'm working with ROS Melodic and Gazebo 9.9.0 on an Ubuntu 18.04.2 LTS. I want to send a 2019-07-03 02:32:59 -0500 received badge ● Notable Question (source)