ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
2019-05-20 02:10:09 -0500 | marked best answer | Question on turtlesim tutorial: Go to Goal Hello, I am new to ROS and I am trying to implement the Go to Goal tutorial in C++ (the tutorial itself is in python but wanted to implemented it in C++). The part I am having trouble understanding is, in the function move2goal() there is a while loop who's condition depends on the magnitude of the error between the current pose and goal pose and it is in this loop that the commanded velocity is calculated. I ran the script and it works fine. When I try to implement the same code in C++ I too have a function, velocity_calc() which has a while loop based on the magnitude error. It is in this loop that I calculate the commanded velocity (same as tutorial). The problem I am facing is, when I call this function in my main() (like they did in the tutorial) the compiler gets stuck in the while loop and is not able to update the current pose ie go to the call back function. I did over come this by replacing the while loop with an if condition in my callback and got it to work. But I am still curious as to why the while loop does not work for me. How is the python script able to update the current pose in the while loop? turtle_cl.h
|
2018-01-27 01:48:24 -0500 | received badge | ● Famous Question (source) |
2018-01-14 06:42:25 -0500 | received badge | ● Notable Question (source) |
2018-01-14 06:42:25 -0500 | received badge | ● Popular Question (source) |
2018-01-10 11:12:02 -0500 | commented answer | CSM Package Not Found I got an error saying "Could not find a package configuration file provided by "csm" with any of the following names: |
2017-12-06 15:06:02 -0500 | commented question | " ‘selectROI’ was not declared in this scope " I am on Kinetic and yes, I built it myself. |
2017-12-06 12:14:11 -0500 | asked a question | " ‘selectROI’ was not declared in this scope " " ‘selectROI’ was not declared in this scope " Hello, I am trying to use OpenCV's object tracker(s) and I am running in |
2017-11-23 02:06:39 -0500 | received badge | ● Famous Question (source) |
2017-11-05 10:32:23 -0500 | received badge | ● Notable Question (source) |
2017-10-02 15:59:08 -0500 | received badge | ● Enthusiast |
2017-09-25 08:38:49 -0500 | answered a question | Question on turtlesim tutorial: Go to Goal Adding ros::spinOnce() in velocity_calc() fixes this. I also learnt that python supports multi threading which enables i |
2017-09-25 08:36:43 -0500 | received badge | ● Popular Question (source) |
2017-09-21 11:02:22 -0500 | edited question | Question on turtlesim tutorial: Go to Goal Question on turtlesim tutorial: Go to Goal Hello, I am new to ROS and I am trying to implement the Go to Goal tutorial |
2017-09-21 10:05:41 -0500 | received badge | ● Supporter (source) |
2017-09-21 10:04:53 -0500 | asked a question | Question on turtlesim tutorial: Go to Goal Question on turtlesim tutorial: Go to Goal Hello, I am new to ROS and I am trying to implement the Go to Goal tutorial |
2017-09-21 09:34:11 -0500 | received badge | ● Notable Question (source) |
2017-09-21 09:34:11 -0500 | received badge | ● Popular Question (source) |
2016-04-05 10:51:34 -0500 | commented question | Error with laser_filter node Log file when it ran the node with gdb and typed bt: https://drive.google.com/file/d/0B9ML... |
2016-04-04 23:26:40 -0500 | commented question | Error with laser_filter node I have 5 ultrasonic sensors and all the five range data is put into one laser_scan message under the topic guidance/ultrasonic. |
2016-04-04 23:25:09 -0500 | commented question | Error with laser_filter node Program received signal SIGSEGV, Segmentation fault. 0x00007fffec98dc62 in std::vector<boost::shared_ptr<filters::multichannelfilterbase<float> >, std::allocator<boost::shared_ptr<filters::multichannelfilterbase<float> > > >::size() const () from /home/prashant/ultra_filter/catkin_ws/devel/lib//l |
2016-04-04 17:28:24 -0500 | asked a question | Error with laser_filter node I am trying to implement a laser_filter for ultrasound data so I implemented a LaserScanRangeFilter to filter sensor dropouts and a median filter after. When I roslaunch my package, the following error comes up:
|