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

CodingPeon's profile - activity

2020-12-27 08:09:45 -0500 received badge  Nice Question (source)
2019-04-08 00:33:01 -0500 marked best answer gazebo and timer.py(rate.sleep)

Hi

I'm running yappi to profile the performance of my node written in python.

The node has:

  • 3 timers for controller loops. (2 at 500Hz and 1 at 100Hz)
  • 2 publisher (60Hz for /gazebo/set_model_state and 100Hz)
  • 2 subscriber

When Gazebo is not running, the profiler shows 35.15% time is spent on Rate.sleep()

When Gazebo is running, the profiler shows 46.92% time is spent on Rate.sleep(). In particular, 16.06% is spent on _Condition.wait from threading.py, which doesn't not show up in previous scenario. Nothing change even when I comment out any code related to publishing /gazebo/set_model_state.

I also notice when Gazebo is running, my node that usually takes up ~50% CPU now runs at ~100%. Also the controller loops don't seem to be running on time.

Question is why my node impacted by Gazebo? I should also mention that because I want to run yappi, I'm not using rosrun to launch the node.

2019-02-08 11:00:32 -0500 received badge  Famous Question (source)
2018-09-24 12:26:57 -0500 marked best answer private params in launch file

Hi

From what understand about launch file, <param> defined in <node> are private to that <node>. But the behaviour of my launch file doesn't look right to me. Here is the content of the launch file:

<arg name="num" default="2"/>                                 
<param name="~num_drones" value="$(arg num)"/>                

 <node name="A" pkg="drone_core" type="drone.py">             
     <param name="local_name_leaked" value="leaked"/>          
 </node>                                

 <node name="B" pkg="drone_simulator" type="sim.py">   
     <param name="local_name" value="debug"/>                  
 </node>

Here are what rosparam list returned for A and B

/A/local_name_leaked
/A/num_drones       
/B/local_name       
/B/local_name_leaked
/B/num_drones

So my question is, why would "local_name_leaked" show up under /B namespace?

I'm using Jade.

Thanks

===========================

Update 1

I've narrowed down the cause. I'm reposting the full launch file for clairty

<?xml version="1.0" encoding="utf-8"?>                          

<launch>                                                        

    <param name="~num_drones" value="2"/>                       
    <!--param name="num_drones_local" value="2"/-->             

    <node name="A" pkg="drone_core" type="drone.py">           
        <param name="local_name_leaked" value="leaked" />       
    </node>                                                     

    <node name="B" pkg="drone_simulator" type="sim.py"> 
      <param name="local_name" value="debug"/>                  
    </node>                                                     

</launch>

With this <param name="~num_drones" value="2"/>, I get:

PARAMETERS                      
 * /A/local_name_leaked: leaked 
 * /A/num_drones: 2             
 * /B/local_name: debug         
 * /B/local_name_leaked: leaked 
 * /B/num_drones: 2                   
 * /rosdistro: jade             
 * /rosversion: 1.11.21

With this <param name="num_drones_local" value="2"/> I get:

PARAMETERS                       
 * /A/local_name_leaked: leaked  
 * /B/local_name: debug          
 * /num_drones_local: 2          
 * /rosdistro: jade              
 * /rosversion: 1.11.21

Notice one has "~num_drones", one has "num_drones". I was assuming <param name="~num_drones" value="2"/> would create private param in any sub sequence declaration of <node> block. But is that allowed? It seems to do that, but also cause any parameter declared inside <node> block to "leak" to sub sequence <node> blocks.

2018-09-24 12:11:27 -0500 received badge  Notable Question (source)
2018-09-24 12:11:27 -0500 received badge  Popular Question (source)
2018-04-09 09:29:04 -0500 received badge  Student (source)
2018-03-11 20:53:56 -0500 edited question gazebo and timer.py(rate.sleep)

gazebo and timer.py(rate.sleep) Hi I'm running yappi to profile the performance of my node written in python. The node

2018-03-11 20:20:56 -0500 edited question gazebo and timer.py(rate.sleep)

gazebo and timer.py(rate.sleep) Hi I'm running yappi to profile the performance of my node written in python. The node

2018-03-11 20:20:17 -0500 asked a question gazebo and timer.py(rate.sleep)

gazebo and timer.py(rate.sleep) Hi I'm running yappi to profile the performance of my node written in python. The node

2018-02-24 19:11:55 -0500 received badge  Famous Question (source)
2018-02-24 15:15:04 -0500 commented answer private params in launch file

I've opened an issue: https://github.com/ros/ros_comm/issues/1334

2018-02-24 15:12:16 -0500 edited question private params in launch file

private params in launch file Hi From what understand about launch file, <param> defined in <node> are priv

2018-02-22 13:36:20 -0500 received badge  Notable Question (source)
2018-02-22 12:06:13 -0500 commented question private params in launch file

Because of character limits in reply box, I've updated the original post with my findings

2018-02-22 12:05:15 -0500 edited question private params in launch file

private params in launch file Hi From what understand about launch file, <param> defined in <node> are priv

2018-02-22 12:05:15 -0500 received badge  Editor (source)
2018-02-21 04:31:57 -0500 received badge  Popular Question (source)
2018-02-21 00:14:35 -0500 asked a question private params in launch file

private params in launch file Hi From what understand about launch file, <param> defined in <node> are priv

2017-04-03 12:18:02 -0500 received badge  Famous Question (source)
2017-02-09 11:44:57 -0500 received badge  Enthusiast
2017-02-05 20:04:00 -0500 received badge  Notable Question (source)
2017-02-05 12:17:47 -0500 commented answer turtlebot installation with Gazebo 5 on Indigo

Are you suggesting deb install gazebo2 and turtlebot + all dependency on indigo first. Then when i work on the other project on Jade, uninstall only gazebo2 package. Install Gazebo 5 on Jade. Then when i go back to Indigo again remove only Gazebo5 and install Gazebo 2?

2017-02-05 12:15:26 -0500 commented answer turtlebot installation with Gazebo 5 on Indigo

I'm aware of the default support Gazebo version. Unfortunately I'm working on both projects at the same time, and most like require to use Gazebo on both.

2017-02-05 12:06:43 -0500 received badge  Popular Question (source)
2017-02-04 01:51:28 -0500 answered a question turtlebot installation with Gazebo 5 on Indigo

I ended up installing packages from source. http://answers.ros.org/question/20896... Things are installed, but I haven't tried interacting with the hardware yet using these packages yet.

First turtlebot_simulator, and kobuki_desktop from source http://wiki.ros.org/turtlebot_simulat... , http://wiki.ros.org/kobuki_desktop

Then the rest from source: http://wiki.ros.org/turtlebot/Tutoria... (without the first step these install from source would still complain about missing/unable to install packages depending on gazebo2)

(Note: For some reason I would get multiple package with same name errors during rosdep install at the second step. I had to manually remove the duplicates.)

2017-02-03 00:10:41 -0500 asked a question turtlebot installation with Gazebo 5 on Indigo

I'm on Ubuntu 14.04.

I have Jade with default Gazebo (5) installed for a course I'm taking. Then my other course requires Indigo. So I installed Indigo as second ROS on my system and this is where my problem begins.This is my steps:

  1. I installed ros-indigo-desktop.
  2. Since I already have Gazebo 5, I only installed ros-indigo-gazebo5-ros-pkgs following this link http://gazebosim.org/tutorials/?tut=r...

Everything seems fine. Then I moved on to installing turtlebot. http://wiki.ros.org/turtlebot/Tutoria...

  1. Then I can't install ros-indigo-turtlebot-simulator,
  2. because ros-indigo-turtlebot-simulator can't be installed
  3. because ros-indigo-turtlebot-simulator can't be installed, which looks for gazebo2

Is there a way to resolve this dependency issue? I don't have to use gazebo 5 on Indigo, but I can't install ros-indigo-desktop-full due to Gazebo 5 on Jade.

Thanks


UPDATE I ended up installing packages from source. http://answers.ros.org/question/20896... Things are installed, but I haven't tried interacting with the hardware yet using these packages yet.

First turtlebot_simulator, and kobuki_desktop from source http://wiki.ros.org/turtlebot_simulat... , http://wiki.ros.org/kobuki_desktop

Then the rest from source: http://wiki.ros.org/turtlebot/Tutoria... (without the first step these install from source would still complain about missing/unable to install packages depending on gazebo2)

(Note: For some reason I would get multiple package with same name errors during rosdep install at the second step. I had to manually remove the duplicates.)


UPDATE 2 I'm having problem with moving Indigo turtlebot in Gazebo5. its almost as if it doesn't move. If I hold the move key on turtlebot_telop long enough, I could see the displacement. I might stop pursuing this matter and consider suggestions below