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

alecive's profile - activity

2017-01-16 02:06:30 -0500 received badge  Famous Question (source)
2016-12-06 09:52:32 -0500 received badge  Notable Question (source)
2016-12-06 08:57:43 -0500 commented answer Quaternion.Slerp vs Quaternion.RotateTowards [Unity3D API vs ROS API]

So from my understanding what rviz_animate_view_controller is doing is exactly what gazebo does (i.e. independent yaw-pitch-roll rotations), which may be okay if you have a continuous control that gives you small increments, but is not general enough for my purposes.

2016-12-06 08:55:46 -0500 commented answer Quaternion.Slerp vs Quaternion.RotateTowards [Unity3D API vs ROS API]

I dug into rviz_animated_view_controller and I believe that the transitions are done within this function. Documentation says: "Applies a body-fixed-axes sequence of rotations; only accurate for small angles."

2016-12-06 08:46:49 -0500 commented answer Quaternion.Slerp vs Quaternion.RotateTowards [Unity3D API vs ROS API]

Thanks for the suggestion! Unfortunately, Gazebo's Camera class allows only for rotations along yaw, pitch and roll separately, whereas the rviz* is not documentated and is difficult to understand its internal functioning. I opened an issue on the GH repo, although the last commit was from 2014.

2016-12-06 07:42:32 -0500 received badge  Popular Question (source)
2016-12-05 14:17:44 -0500 commented question Quaternion.Slerp vs Quaternion.RotateTowards [Unity3D API vs ROS API]

Agreed, I updated my question. Thank you!

2016-12-05 14:17:30 -0500 received badge  Editor (source)
2016-12-05 11:26:18 -0500 asked a question Quaternion.Slerp vs Quaternion.RotateTowards [Unity3D API vs ROS API]

Hello everybody,

I am trying to compute a smooth trajectory between a 6D starting pose and a 6D desired pose. Everything is fine for what concerns the 3D positional component, but I am having issues with the orientation (and the quaternion that describes it).

Trying to look for help online, most of the references pointed to Unity 3D methods and specifically to Quaternion.RotateTowards, which has been deemed to be better than Quaternion.Slerp. Unfortunately, being Unity closed source, I could not find any source code to see what they actually do and why the former is better than the latter.

Unfortunately, the ROS API only provides a comparable method for quaternion.slerp, available here. So, my questions at this point are multiple:

  • Does anybody know what "rotateTowards" does and how it is better than the Spherical Linear Interpolation method?
  • Would it be possible to implement a similar method (if proven to be more advantageous than "slerp") ?
  • Is slerp sufficient for my needs? EDIT: my goal is to simply create a trajectory from one pose to another, i.e. to interpolate both 3D position and 3D orientation to gradually move from the starting pose to the final desired one. For what concerns the quaternion describing the orientation, it is not clear to me if "slerp" would be the method I need for my purposes. In particular, for the position I can easily implement a straight trajectory from one point to another by using the motion equation of a point over time (with a fixed velocity), but I don't understand how can I do it w.r.t. the orientation. Can I use some sort of angular velocity to feed "slerp" with?
2016-12-05 11:06:57 -0500 commented answer ROS Threading, AsyncSpinners and Control

@kramer , I dug deeper into the issue. Apparently, it was not an issue in my code, nor the network: rather, the service request I was asking (that is, an IK call for the Baxter robot), some times got stuck into its computation. Changing the IK solver solved the issue altogether. Thank you!

2016-12-05 11:03:06 -0500 received badge  Scholar (source)
2016-09-12 10:12:48 -0500 received badge  Famous Question (source)
2016-08-19 18:34:18 -0500 commented answer ROS Threading, AsyncSpinners and Control

kramer, sorry for the delay: I wanted to perform some more testing before coming back to you. I'm starting to think that the 1s delays are caused by spikes in the network usage that top up the bandwidth. I am changing my code in order to address this. I'll answer you when I will have more info.

2016-08-17 11:05:11 -0500 commented answer ROS Threading, AsyncSpinners and Control

Hello kramer, thank you for the reply! I answered to you by editing my first post.

2016-08-17 09:27:59 -0500 received badge  Notable Question (source)
2016-08-12 01:25:29 -0500 received badge  Popular Question (source)
2016-08-11 17:39:47 -0500 answered a question rosbridge can't be installed in ubuntu 16.04

It seems to me that the package is not available in kinetic (yet).

UPDATE: as you can see here http://wiki.ros.org/rosbridge_server , there does not seem to be a kinetic ready version of rosbridge_server .

2016-08-11 09:26:09 -0500 asked a question ROS Threading, AsyncSpinners and Control

Hello everybody,

I am a relatively new ROS user (but I've spent years working with other middlewares), and up to now I am generally happy about it. I have a doubt related to my software framework I would like to clarify. To this end, I will describe the framework I have, so that some more experienced ROS user can tell me where I am doing wrong:

  • I have a node that is composed of two controllers (one for each of the Baxter's arms). Each controller subscribes to a variety of topics and publishes to a variety of topics. They are implemented as classes, and they both use an AsyncSpinner.
  • This is a pseudo-code of my framework. In the main:

    int main()
    {
        Controller c1("left");
        Controller c2("right");
    
        ros::spin();
    }
    

    in the constructors:

    Controller::Controller(string limb): _limb(limb), spinner(4)
    {
        ...
    
        spinner.start();
    }
    

    Question 1: is this a correct initialization of an AsyncSpinner? Right now I have two AsyncSpinners that are initialized in the same process/node. Question 2: Do they share the same 4 threads? I am not using custom callback queues.

  • A part from subscribing to topics, both controllers have a main control loop that I implemented as a pthread, which runs in parallel with everything else. It is crucial for my pthreads to have a constant control rate of at least 100Hz, but at the same time I would like to update the information coming from the subscribers while the thread is doing its job. What I did to this end was the following pseudo code related to the run() of the thread:

    pthread_run()
    {
        while(ros::ok())
        {
            ...
    
            ros::spinOnce();
            ros::Rate(100).sleep();
        }
    }
    

    Question 3: with the presence of an AsyncSpinner, is the ros::spinOnce() necessary, or can I remove it? As far as I understood I should not need a ros::spinOnce(), because my callback queue is guaranteed to be emptied in the other three threads I fed the spinner with. Is it correct?

  • No matter what I try, some times I experience dropped frames in my pthreads, which negatively affect my control loop. The reasons for this might be multiple (delays in the network, etc), but here is my Question 4: is this issue related to how I implemented my code? As a matter of fact, this is the main reason for which created this question. I am sure it is not a CPU load problem.
  • I was thinking of dropping altogether the pthreads and implementing the control loops as callbacks that I would then add to the ros::getGlobalCallbackQueue() so that I do not have to take care of the threading at all. Question 5: does this make any sense, or is it going to solve my problem?

Thank you for your help. I know that some of this questions might seems stupid, but I didn't find anything useful online, and I would like to use ROS to the best of its capabilities.

Answer to kramer: thank you for ... (more)

2016-08-10 15:12:04 -0500 commented question Undefined reference to ros::init on Jade

Why do you have your add_dependencies after target_link_libraries?