ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

afakih's profile - activity

2021-03-21 10:20:19 -0500 received badge  Great Answer (source)
2020-11-11 04:15:20 -0500 received badge  Good Answer (source)
2020-07-09 06:54:29 -0500 received badge  Nice Answer (source)
2020-01-24 10:40:17 -0500 received badge  Great Answer (source)
2017-11-03 07:10:05 -0500 received badge  Good Answer (source)
2017-03-17 20:12:00 -0500 received badge  Enlightened (source)
2017-02-20 07:56:58 -0500 received badge  Good Answer (source)
2017-02-16 20:08:59 -0500 received badge  Nice Answer (source)
2017-02-16 15:28:45 -0500 commented question Is it possible to parse the fields and values of a custom ros msg binary file in python without knowing the message definition?

You would need to do something similar to what's is in 'msg_generator` function which generates python code from the .msg. To load the .msg into a MsgSpec you would need something similar to https://github.com/ros/genmsg/blob/in...

2017-02-16 13:57:55 -0500 received badge  Necromancer (source)
2017-02-16 13:49:41 -0500 commented question Is it possible to parse the fields and values of a custom ros msg binary file in python without knowing the message definition?

You mean you want to do the de-serialization yourself, without having to import custom_msg.msg? If yes you would be re-doing what genpy does. look at https://github.com/ros/genpy/blob/kin...

2017-02-16 13:34:47 -0500 answered a question roslaunch can't find launch files with "catkin build"

It looks like that you have the catkin install option enabled for your workspace and you do not have install rules for the launch files in the packages CMakeLists.txt.

When install is enabled, source devel/setup.bash will source the install space instead of the devel one. To disable the install option do

catkin config --no-install
catkin clean --all

Then rebuild your workspace.

To add an install rule in your CMakeLists.txt, add:

install(DIRECTORY
launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
2017-02-08 08:10:22 -0500 commented question ros.spinOnce() during delay

ros::rate r(10); as it is used, is doing nothing. If you want the loop to run at 10Hz you should call r.sleep() at the end of your while loop.

Currently the loop would run at a rate of 1/(2 + call backs processing time).

2017-02-07 14:58:54 -0500 commented question read bag messages as numpy in python

for topic, msg_raw, t in bag.read_messages(raw=True):

         msg_type = msg_raw[4]
         msg = msg_type()
         msg.deserialize_numpy(msg_raw[1], numpy)`
2016-12-02 14:35:08 -0500 received badge  Necromancer (source)
2016-12-02 08:34:32 -0500 answered a question How do I only run tests for only one package?

To run a catkin test for a specific catkin package, from a directory within that package:

   catkin run_tests --no-deps --this
2016-11-23 18:33:20 -0500 received badge  Nice Answer (source)
2016-05-20 01:16:43 -0500 received badge  Teacher (source)
2016-05-20 01:16:43 -0500 received badge  Necromancer (source)
2015-11-17 07:02:26 -0500 received badge  Enthusiast
2015-11-03 15:31:32 -0500 answered a question how to launch a launch file from python code

Something like this would work

  import roslaunch

  uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
  roslaunch.configure_logging(uuid)
  launch = roslaunch.parent.ROSLaunchParent(uuid, [file_path])
  launch.start()