Ask Your Question

BennyRe's profile - activity

2019-10-28 18:55:15 -0500 received badge  Good Answer (source)
2019-08-09 03:03:38 -0500 received badge  Nice Answer (source)
2019-05-22 02:15:17 -0500 received badge  Nice Answer (source)
2018-11-04 07:51:19 -0500 received badge  Nice Answer (source)
2017-07-24 13:21:33 -0500 received badge  Good Answer (source)
2017-03-29 16:45:08 -0500 received badge  Guru (source)
2017-03-04 08:52:51 -0500 received badge  Good Answer (source)
2016-11-21 10:45:38 -0500 received badge  Nice Answer (source)
2016-10-05 02:44:17 -0500 received badge  Good Answer (source)
2016-06-21 16:31:08 -0500 received badge  Good Answer (source)
2016-06-06 07:43:16 -0500 commented question Separate compilation C++ ROS

In your question you write that you do add_executable(main_test src/main_test.cpp src/functions_test.cpp) which is correct. In your CMakeLists.txt you don't do this. You write that you updated your file, was it this what you updated?

2016-05-30 06:58:49 -0500 commented question Separate compilation C++ ROS

Everything looks good to me. Can you please post your complete CMakeLists.txt?

2016-05-23 01:13:23 -0500 commented question roslaunch turtlebot_bringup minimal.launch does not work

Do you mean with message the 'queue_size' one? This is just a warning and does not influence behavior.

2016-05-23 01:08:56 -0500 answered a question Unable to Locate ROS Packages?

Do you have reasons to install ROS from source? If not don't do it! Did you follow this tutorial step by step?

2016-05-23 01:05:52 -0500 answered a question how to send and receive msg for a kobuki?

The tutorials are a good place to start.

2016-05-12 02:21:05 -0500 received badge  Nice Answer (source)
2016-05-11 12:15:42 -0500 received badge  Nice Question (source)
2016-04-28 11:47:15 -0500 received badge  Nice Answer (source)
2016-04-25 02:52:27 -0500 commented answer Multiple subscribers and single publisher in one python script?

while not (lat != 0 and lon != 0) and not rospy.is_shutdown():

should do the trick

2016-04-21 01:54:58 -0500 commented answer Multiple subscribers and single publisher in one python script?

+1 for using a class. You could even get rid of the ugly global variables lat1 and long1. Another improvement in my eyes would be to remove the complete navStuff topic. Just call call_move() directly.

2016-04-21 01:49:51 -0500 commented answer Multiple subscribers and single publisher in one python script?

Did you insert the while loop?

2016-04-20 02:50:05 -0500 commented answer Multiple subscribers and single publisher in one python script?

Yes I also thought about this. In this while I check if they got a value from the callback. At the time of declaration lat = 0 lon = 0 they are integers. As soon as the callback stores values in them they become floats and the while ends.

2016-04-19 06:13:42 -0500 answered a question Multiple subscribers and single publisher in one python script?

Oh dear this code is a mess.

Have you read and UNDERSTOOD all tutorials under http://wiki.ros.org/ROS/Tutorials?

There are a few things wrong here.

  1. You don't need all these rospy.Rate.
  2. Don't create the publishers in your callbacks. Define them global and just publish in your callbacks.
  3. Do other nodes need the data you publish on the navStuff topic? If not remove this whole topic from you program. There are much cheaper and easier ways to handle data inside your program e.g. store it in a global or member variable.

If I understand you right you need data from both /imu_um6/mag and /gps/fix. As soon as you got both you need to process it and publish to /husky_velocity_controller/cmd_vel. What you have to do is, store the data from these two topics in a global variable. In your run method you wait until you got your data and then process it and publish it.


Update

That already looks way better. I would recommend you to read some good Python tutorials. The learning curve of ROS itself is quite steep. But learning ROS and Python together can lead to heavy headache.

global lat 
global lon 

lat = navsat.latitude
lon = navsat.longitude

This is correct. You store the latitute and longitude in the global variables.

return lon
return lat

This is useless. 1. Callbacks don't process return values. 2. The second return is never reached since the function ends with the first return. (The correct way to do such stuff in Python would be return (lon, lat))

rospy.spin()

This call is blocking forever, so printer() is never invoked. Remove this rospy.spin()

Your printer()method could look like

def printer():
    while not (lat != 0 and lon != 0):
        rospy.sleep(.01)
    rospy.loginfo("Latitude: %s", lat)
    rospy.loginfo("Longitude: %s", lon)
2016-03-30 04:56:05 -0500 commented question how to publish sensor_msgs/Joy in C++ ?

As @Mehdi said please confirm that this function is being called. Second do you spin your node?

2016-03-10 13:27:10 -0500 received badge  Great Answer (source)
2016-03-10 09:31:49 -0500 commented question image_view symbol lookup error

Please provide more information. What commands do you run so that these errors occur?

2016-03-10 02:07:36 -0500 commented answer ImportError: cannot import name EXT_MSG

I converted your comment to an answer. Please mark it as correct.

2016-03-09 09:20:58 -0500 received badge  Famous Question (source)
2016-03-07 05:14:54 -0500 commented answer CMake error in hector_navigation or navigation

No. You should only install a package from source (from github.com...) if you have reasons to do it. If you just want to use the package then installing it via sudo apt-get install ... should be preferred.

2016-03-07 04:16:09 -0500 answered a question CMake error in hector_navigation or navigation

This error says that the package pcl_conversions is missing. Install it by hand or use the very useful rosdep tool. (Not sure if it works on a RPi)

2016-03-07 04:12:08 -0500 commented question ImportError: cannot import name EXT_MSG

Please post your CMakeLists.txt You could also try the catkin_lint tool. It's a great tool to resolve errors in your CMakeLists.txt and package.xml

2016-03-07 03:54:56 -0500 edited question ImportError: cannot import name EXT_MSG

Hi,I am using ubuntu14.04+indigo

I got an error when I run catkin_make

[ 67%] Built target actionlib_msgs_generate_messages_cpp
Traceback (most recent call last):
  File "/opt/ros/indigo/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py", line 41, in <module>
    from genmsg import EXT_MSG, EXT_SRV, MsgContext
ImportError: cannot import name EXT_MSG
make[2]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionResult] Error 1
make[1]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionResult.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/opt/ros/indigo/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py", line 41, in <module>
    from genmsg import EXT_MSG, EXT_SRV, MsgContext
ImportError: cannot import name EXT_MSG
make[2]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionGoal] Error 1
make[1]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionGoal.dir/all] Error 2
Traceback (most recent call last):
  File "/opt/ros/indigo/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py", line 41, in <module>
    from genmsg import EXT_MSG, EXT_SRV, MsgContext
ImportError: cannot import name EXT_MSG
make[2]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionActionResult] Error 1
make[1]: *** [procrob_functional/CMakeFiles/_face_recognition_generate_messages_check_deps_FaceRecognitionActionResult.dir/all] Error 2
[ 67%] Built target std_msgs_generate_messages_cpp
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

please help me,thx

2016-03-07 03:53:41 -0500 commented answer How to install both ROS jade and indigo together

I converted your comment to an answer. Please mark it as correct if your problem is solved.

2016-03-04 04:54:48 -0500 commented question How to install both ROS jade and indigo together

Usually this should just simply work. Have you tried executing sudo apt-get dist-upgrade or some other apt-get dependency conflict trouble shooting steps?

2016-03-04 04:49:29 -0500 commented answer How to publish a XML?

Please do not comment with answers. Use the comment function for commenting.

2016-03-03 09:50:48 -0500 received badge  Nice Answer (source)
2016-02-26 09:40:12 -0500 commented question Failed to connect the usb camera

Did you try the libuvc_camera package?

2016-02-04 18:51:48 -0500 received badge  Good Answer (source)
2016-02-03 02:39:58 -0500 answered a question How to convert geometry_msgs/Pose to geometry_msgs/PoseStamped

geometry_msgs/PoseStamped contains two fields. header and pose.

You can create an empty PoseStamped and set pose to your geometry_msgs/Pose. If you want you can also set some fields in the header.

No black magic.

2016-02-03 01:39:56 -0500 commented answer Linking with 32 bit libraries

Assuming you are using Ubuntu 14.04 and Indigo download this file and open it with the archive manager. This file contains libroscpp.so

2016-02-02 02:10:40 -0500 commented answer Linking with 32 bit libraries

Please read the above comments. I downloaded the packages from http://packages.ros.org/ros/ubuntu/pool/main/r/ and extracted the .so libs. Then I put these libs in the lib directory of my package. In the CMakeLists.txt you link against these.

2016-02-01 07:08:13 -0500 answered a question how to install ros packages?

The easiest and preferred way of installing packages is via

$ sudo apt-get install ros-<your distro>-<package name>

like e.g.

sudo apt-get install ros-indigo-hector-slam

If there is no debian build or you need the source version for some reason you clone the Github repo to the src folder of your catkin workspace.

2016-02-01 07:02:17 -0500 commented answer Linking with 32 bit libraries

I deliver the required ROS libraries (and some others) in 32-bit binaries with my package in a libs directory.

2015-12-17 05:45:00 -0500 commented question Tf has two or more unconnected trees

I don't know. You should know which node is responsible for odometry and/or localization but it should be one of /Mapper /lsm_node /odom_lsm /robot_pose_ekf

2015-12-17 02:20:02 -0500 answered a question CMake Error when building NAO packages

You are missing the naoqi_bridge_msgs package. You have to install it.

2015-12-17 02:12:11 -0500 commented question Tf has two or more unconnected trees

Does the output of your odometry/localization node say something helpful?