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

hamzamerzic's profile - activity

2022-08-18 02:45:54 -0500 received badge  Good Question (source)
2021-02-10 03:53:43 -0500 received badge  Good Question (source)
2021-01-08 03:08:46 -0500 received badge  Nice Question (source)
2020-12-07 18:10:33 -0500 received badge  Nice Question (source)
2019-09-04 07:57:10 -0500 received badge  Famous Question (source)
2018-12-21 18:49:42 -0500 received badge  Taxonomist
2018-12-12 03:36:52 -0500 received badge  Notable Question (source)
2018-12-12 03:36:52 -0500 received badge  Popular Question (source)
2018-09-19 16:34:45 -0500 commented answer Generating an ikfast solution for 4 DOF arm

I've never tried it on 4 DOF problems, I've only used 6 and 7 DOF solvers. As far as I know, ikfast does not work on und

2018-09-09 18:26:07 -0500 commented answer Generating an ikfast solution for 4 DOF arm

Just an update on this. As mentioned earlier, the reason for the high bandwidth is that I am writing the full length bui

2018-09-09 18:25:45 -0500 commented answer Generating an ikfast solution for 4 DOF arm

Just an update on this. As mentioned earlier, the reason for the high bandwidth is that I am writing the full length bui

2018-08-08 01:26:22 -0500 marked best answer Is wait_for_service required before every service call?

Hi, I don't fully understand the mechanics of rospy's wait_for_service function. Are we required to call wait for service every time we want to call the service, or only once when creating the ServiceProxy?

2018-08-08 01:26:12 -0500 received badge  Famous Question (source)
2018-07-31 05:31:06 -0500 commented answer Generating an ikfast solution for 4 DOF arm

Thanks for checking this @mgangl I've only used this for jobs lasting up to half an hour or so, and there the files were

2018-07-31 05:29:23 -0500 commented answer Generating an ikfast solution for 4 DOF arm

Thanks for checking this @mgangl I will try to find a better way of passing the log without requiring the user to "downl

2018-07-30 12:15:56 -0500 commented answer Generating an ikfast solution for 4 DOF arm

Hi, that is quite surprising. There definitely is a loop running in the background which ensures that the console output

2018-03-18 07:06:38 -0500 commented answer Generating ikfast plugin for 5 DOF robot

Yes, I am aware that this is an issue and even though I am not permanently storing user provided files, there is no way

2018-03-17 20:34:07 -0500 answered a question Generating ikfast plugin for 5 DOF robot

I have created a tool for online generation of ikfast solvers - meaning no need to do any manual setting up. You can fin

2018-03-17 20:33:34 -0500 commented answer Generating an ikfast solution for 4 DOF arm

I have created a tool for online generation of ikfast solvers - meaning no need to do any manual setting up. You can fin

2018-03-16 04:15:23 -0500 received badge  Notable Question (source)
2018-02-28 20:28:41 -0500 marked best answer How to thread a specific computationally expensive callback

Hello ROS community.

I am building a specific application where I have two subscriber callbacks as written below:

def callback1(msg):
    X = msg.X

def callback2(msg):
    desX = msg.desX
    publish(desX)
    while duration < 1 sec:
        if equal(X, desX):
            return True
    return False

The callbacks are oversimplified for easier understanding, and I also assume X is some global variable (or object attribute), so that both callbacks can access it.

callback1 is a sensor measurement coming in at 20 Hz.

callback2 is called on user request, but let's assume it can be called at more than 1 Hz.

In a single threaded mode, this will not work, since callback2 blocks callback1 and the sensor measurement is not read properly. I would like to implement this multi-threaded, but with following requirements:

  1. callback1 is blocking, i.e. two of them cannot be performed at the same time,
  2. callback2 is preemptable, i.e. if another call is made the previous one will be canceled,
  3. It should be done in C++.

My initial idea was to have a separate callback queue for callback2 and have the callback1 in the global queue in the single-threaded callback manner, like mentioned here under point 2.

I would like to know how to implement this given the additional requirement that the callback2 is preemptable. Also, any other design recommendations are more than welcome!

2017-12-07 06:42:12 -0500 commented answer Generating an ikfast solution for 4 DOF arm

To add to this - in case you don't go with the Docker image, make sure you don't have mpmath installed.

2017-12-07 06:42:01 -0500 commented answer Generating an ikfast solution for 4 DOF arm

To add to this - in case you don't go with the Docker image, make sure you don't have mpmatht installed.

2017-12-07 06:42:01 -0500 received badge  Commentator
2017-11-26 16:04:30 -0500 marked best answer Importing a module that uses rospy from a module in Python3

Hi. I have a library that is fully written in Python3.5 and I want to interface it with a module that I wrote. The module that I wrote imports rospy, so it depends on Python2.7. When I try to do this I get the following error:

python3 script_running_library_in_python3.py
Traceback (most recent call last):
  File "script_running_library_in_python3.py", line 11, in <module>
    from module_using_rospy.core import SomeClass
  File "/home/hamza/catkin_ws/src/module_using_rospy/module_using_rospy/core.py", line 9, in <module>
    import rospy
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 47, in <module>
    import yaml
  File "/usr/local/lib/python2.7/dist-packages/yaml/__init__.py", line 2, in <module>
    from error import *
ImportError: No module named 'error'

Any idea how I could make this work? Thank you!

2017-10-03 16:49:05 -0500 commented answer Importing a module that uses rospy from a module in Python3

Yes, after fixing the PYTHONPATH it worked without issues. But keep in mind that some functionalities might not still be

2017-10-03 16:36:53 -0500 received badge  Student (source)
2017-10-03 16:36:48 -0500 received badge  Self-Learner (source)
2017-10-03 16:36:48 -0500 received badge  Necromancer (source)
2017-10-03 16:36:48 -0500 received badge  Teacher (source)
2017-10-03 16:36:04 -0500 received badge  Famous Question (source)
2017-09-26 04:15:03 -0500 received badge  Famous Question (source)
2017-07-31 18:07:44 -0500 received badge  Notable Question (source)
2017-07-31 11:31:53 -0500 received badge  Famous Question (source)
2017-07-31 11:31:19 -0500 answered a question Importing a module that uses rospy from a module in Python3

It was an error in how I sourced things and how I set up PYTHONPATH. The problem is the collision between libraries, and

2017-07-31 11:28:09 -0500 received badge  Popular Question (source)
2017-07-31 11:27:36 -0500 answered a question Using catkin without ROS

It seems that downloading catkin and placing it in the source directory allows using catkin_tools without ROS.

2017-07-30 14:17:34 -0500 commented question Using catkin without ROS

Is there now a way to make catkin_tools ROS independent?

2017-06-16 03:11:32 -0500 asked a question Importing a module that uses rospy from a module in Python3

Importing a module that uses rospy from a module in Python3 Hi. I have a library that is fully written in Python3.5 and

2017-06-08 16:28:33 -0500 received badge  Popular Question (source)
2017-06-08 05:25:40 -0500 commented answer Is wait_for_service required before every service call?

What can cause the service to become unavailable?

2017-06-08 03:34:59 -0500 asked a question Is wait_for_service required before every service call?

Is wait_for_service required before every service call? Hi, I don't fully understand the mechanics of rospy's wait_for_s

2017-06-08 03:33:35 -0500 received badge  Popular Question (source)
2017-06-08 03:33:35 -0500 received badge  Notable Question (source)
2017-05-22 08:44:05 -0500 asked a question When to call wait_for_service and how to check if persistent connection is broken

When to call wait_for_service and how to check if persistent connection is broken This is more like two questions in one

2017-01-09 22:51:24 -0500 asked a question Automatically specify the port for rostest

Hello ROS community.

I am writing unit tests for a functionality that monitors the status of the roscore and performs certain steps in case the roscore stops working (properly). Now, one of the tests I have tests the behavior of complete roscore crash. To do that I do the following:

  1. add_custom_target with a command that spawns a roscore and make it a dependency to the test,
  2. In the test I use --reuse-master flag to attach to the spawned roscore,
  3. I kill the attached roscore within the test to test if the functionality works properly.

All of that looks something like this:

  add_custom_target(custom_command_${PROJECT_NAME}
    COMMAND nohup roscore > /dev/null 2>&1 & sleep 1
  )

  add_executable(${PROJECT_NAME}-rostest)  #  ... link libraries etc. Here the roscore is being killed by grep-ing for it's pid

  add_rostest(test/test_kill_roscore.test
    ARGS --reuse-master --clear
    DEPENDENCIES custom_command_${PROJECT_NAME} ${PROJECT_NAME}-rostest
  )

Now, I would like to have control of on which port to spawn the roscore, since I don't want to use the default port. Adapting the command to do so is straightforward - simply adding a -p and a port number, but then --reuse-master does not connect to the desired port. Setting ROS_MASTER_URI with the same port before running

  catkin run_tests

solves the problem, but I would like to avoid setting the ROS_MASTER_URI every time I run the test and instead simply hard code the port I want to use. So I would like to know if there is a way of explicitly setting the port for --reuse-master to connect to, or setting the ROS_MASTER_URI for the test case from within the CMakeLists?