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

Randerson's profile - activity

2023-03-11 00:24:31 -0500 marked best answer A silly question about packages organization!!!

Inside a package there is initially the two files CMakeList.txt and package.xml and the folder src. From the tutorials, I understood that the scripts belonging to a package should be placed in its scr folder. However, while studying ROS I found many packages that had thier scripts placed in a user created folder called scripts. Taking into account the said, my question is: Why someones creates a new folder called script instead to use the already existing one called scr. Is this a ROS good practices or just a user preference? If it is a good practice, for what I should use the folder script and for what should I use the folder src.

Thanks in advance!

2022-07-18 09:36:51 -0500 received badge  Nice Question (source)
2021-05-26 05:24:05 -0500 marked best answer Load ROS projects inside Eclipse

Hello all, I am trying quite a reasonable time to load a ros package as a project in Eclipse. Of course I am following the steps of section 2.2 Catkin-y approach from the tutorial IDEs but It is not working. I also checked the Catkin and eclipse answer. All the times that I tried to import a package as a Eclipse project I got No projects are found to import as show in the following screeshot: image description

I will appreciate any king of help or tip like: Should I reinstall eclipse, should I create a new catkin workspace, ...

Thanks.

2020-06-24 10:49:50 -0500 marked best answer rosconsole DEBUG logger. How to use it?

Hello all,

I would like to know how to correct interact with the log messages generated by ROS. I did some research about it but I could not find a satisfactory material. The situation that motivated this question was:

I am running a simple bagfile with scan data information. To avoid the problem with the difference of time between the machine and the scan data from the bagfile I used the flag --clock as suggested in the appropriate documentation, however I did not set the parameter use_sim_time to true. Because of this, when I try to see the scan data on rviz I receive the following message:

[ WARN] [1470408821.734840992]: MessageFilter [target=base_link ]: Dropped 100,00% of messages so far. Please turn the [ros.rviz.message_notifier] rosconsole logger to DEBUG for more information.

Because of this message I tried to somehow turn on the rosconsole logger to DEBUG but I realized that I did not know how to do it.

After this contextualization, I redo my question: How can I work correctly with the ROS's log messages, how can I have access to the messages printed from rviz and what is a best practice to handle with analogous situations?

Thanks

2020-04-17 02:50:41 -0500 received badge  Great Question (source)
2020-02-11 10:29:06 -0500 received badge  Self-Learner (source)
2019-09-21 18:01:03 -0500 received badge  Good Question (source)
2019-05-20 01:57:24 -0500 marked best answer Issue with the urdf_tutorial package and Rviz visualization (Problem may be related with the controller_manager).

I am following the Learning URDF Step by Step tutorial which has the following step

  1. Building a Visual Robot Model with URDF from Scratch
  2. Building a Movable Robot Model with URDF
  3. Adding Physical and Collision Properties to a URDF
  4. Using Xacro to Clean Up a URDF File
  5. Using a URDF in Gazebo

and is based in the urdf_tutorial package.

Well, I was able to follow, understand and make it work as it should be until the step four (Using Xacro to Clean Up a URDF File). But I the fifth step (Using a URDF in Gazebo) although I understood the concepts from the documentation I was no able to make it work as it should in ROS + Rviz + Gazebo. Here goes self-explanatory picture

C:\fakepath\out1.png

As one can see, the robot visualization in Rviz is broken. This situation was created with the command

 roslaunch urdf_sim_tutorial 13-diffdrive.launch

that uses the urdf_tutorial package obtained from this git. The ros output is:

SpawnModel script started
[INFO] [1508101464.915792, 0.000000]: Loading model XML from ros parameter
[INFO] [1508101464.923230, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
[INFO] [1508101465.533706, 0.087000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1508101465.920027, 0.254000]: Spawn status: SpawnModel: Successfully spawned entity
... logging to /home/nut/.ros/log/6ae2963a-b1ec-11e7-8a4c-e02a82110940/roslaunch-renascer-32008.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
]2;/home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/launch/13-diffdrive.launch
started roslaunch server http://renascer:40983/

SUMMARY
========

PARAMETERS
 * /r2d2_diff_drive_controller/angular/z/has_acceleration_limits: True
 * /r2d2_diff_drive_controller/angular/z/has_velocity_limits: True
 * /r2d2_diff_drive_controller/angular/z/max_acceleration: 6.0
 * /r2d2_diff_drive_controller/angular/z/max_velocity: 2.0
 * /r2d2_diff_drive_controller/base_frame_id: base_link
 * /r2d2_diff_drive_controller/left_wheel: ['left_front_whee...
 * /r2d2_diff_drive_controller/linear/x/has_acceleration_limits: True
 * /r2d2_diff_drive_controller/linear/x/has_velocity_limits: True
 * /r2d2_diff_drive_controller/linear/x/max_acceleration: 0.6
 * /r2d2_diff_drive_controller/linear/x/max_velocity: 0.2
 * /r2d2_diff_drive_controller/pose_covariance_diagonal: [0.001, 0.001, 0....
 * /r2d2_diff_drive_controller/publish_rate: 50
 * /r2d2_diff_drive_controller/right_wheel: ['right_front_whe...
 * /r2d2_diff_drive_controller/twist_covariance_diagonal: [0.001, 0.001, 0....
 * /r2d2_diff_drive_controller/type: diff_drive_contro...
 * /r2d2_diff_drive_controller/wheel_separation: 0.44
 * /r2d2_gripper_controller/joints: ['gripper_extensi...
 * /r2d2_gripper_controller/type: position_controll...
 * /r2d2_head_controller/joint: head_swivel
 * /r2d2_head_controller/type: position_controll...
 * /r2d2_joint_state_controller/publish_rate: 50
 * /r2d2_joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /robot_state_publisher/publish_frequency: 30.0
 * /rosdistro: kinetic
 * /rosversion: 1.12.7
 * /rqt_robot_steering/default_topic: /r2d2_diff_drive_...
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    r2d2_controller_spawner (controller_manager/spawner)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    rqt_robot_steering (rqt_robot_steering/rqt_robot_steering)
    rviz (rviz/rviz)
    urdf_spawner (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [32022]
ROS_MASTER_URI=http://localhost:11311
]2;/home/nut/catkin_ws/src/urdf_tutorial/urdf_sim_tutorial/launch/13-diffdrive.launch http://localhost:11311
setting /run_id to 6ae2963a-b1ec-11e7-8a4c-e02a82110940
process[rosout-1]: started with pid [32035]
started core service [/rosout]
process[gazebo-2]: started with pid [32059]
process[gazebo_gui-3]: started with pid [32064]
process[urdf_spawner-4]: started with pid [32069]
process[robot_state_publisher-5]: started with pid [32070]
process[rviz-6]: started with pid [32071]
process[r2d2_controller_spawner-7]: started with pid [32072]
process[rqt_robot_steering-8]: started with pid [32073]
[urdf_spawner-4] process has finished cleanly
log file: /home/nut/.ros/log/6ae2963a-b1ec-11e7-8a4c-e02a82110940/urdf_spawner-4*.log
[rviz-6] killing ...
(more)
2019-04-07 22:44:59 -0500 marked best answer The recommended way to integrate ROS and GAZEBO to build a robot model

Hello, I know that there is a plenty of treads about this subjects but none of them really answered my doubts. But first, a little contextualization.

I am using ROS a while and currently I consider myself an intermediate ROS user. Recently I joint a project where I will be developing and implementing algorithms for an autonomous airship. In the scope of the project, there is not an airship simulator integrated with ROS and since it would be a value tool to have I decided to develop one via GAZEBO. In GAZEBO I consider myself a beginner.

For now I studying a lot of documentations and tutorials and so I am feeling somewhat drowned by all this new information. So I decided to open this thread as an way to consult some expert in ROS and GAZEBO. Here goes what I want and my questions:

  • A want to develop o model of a balloon (let, for now, forget about airship) which I can simulate via GAZEBO and I can interact via ROS. With GAZEBO I expect to use all, or most of all, its simulations tools. In special I want to be able to use the plugins Aerodynamics and Hydrodynamics. With ROS I expect to send control commands to the model and receive sensors information from it

My question is, since for me appears that everything comes from this, the robot model should be build upon the SDF or URDF format to I be able to achieve the detailed functionalities? Because, from what I read, if I use SDF I easily will be able to use the GAZEBO tools and plugins but, in the other hand, I will have difficult to interact with it via ROS. If I use URDF I will be able to interact with it via ROS but I may face some issues with GAZEBO or its plugins. So, what should I work with?

I know that this thread seems a little broad, but I just want an orientation to where to start. For example, If in a few days I make a square floats in GAZEBO that I can move it via ROS it will be a great achievement!

2019-02-11 08:32:00 -0500 received badge  Famous Question (source)
2018-10-10 14:44:41 -0500 received badge  Nice Question (source)
2018-09-18 19:54:21 -0500 marked best answer Rosbag and simulated time

Hello all, I am trying to run a bag file if simulated time but I am not succeeding on it. Here is what happens: After I run the bag file with the command

rosbag play --clock -l laser_scanner3.bag

I am checking the timestamp published by the topic \clock, i.e. the simulated time, and the timestamp presented in another topic, which is not the same as the one from the \clock topic. I need to solve this dyssynchrony, because, otherwise, I will not be able to use the transformations from TF.

I know that this file were originally recorded with ORCA and after transformed in .bag format. Maybe, the issue is here.

Any guess on how I can solve this issue?

Thanks!

2018-09-18 19:53:49 -0500 received badge  Notable Question (source)
2018-09-18 19:53:49 -0500 received badge  Famous Question (source)
2018-09-18 19:53:49 -0500 received badge  Popular Question (source)
2018-09-14 17:24:26 -0500 marked best answer How to properly shutdown a node from command coded in the script of the same node

I have a simple ros application that is used to create a .world file. Everything is working as expected unless the shutdown process. When the script ends the following message is retrieved:

================================================================================REQUIRED process [world_creation-2] has died!
process has finished cleanly
log file: /home/nut/.ros/log/452cd878-dd8f-11e7-9623-e02a82110940/world_creation-2*.log
Initiating shutdown!
================================================================================
[world_creation-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete

I am unsatisfied with the fist part of the message which is appearing in the red color e may pass the felling the some thing is wrong. So, here is my question: How can I finish in a way clean way, from a command codded in the node script, this node. The node script is:

#!/usr/bin/env python    
import sys
import rospy
import numpy as np
import road_generation_gazebo.roads as roads
import road_generation_gazebo.worlds as worlds
import road_generation_gazebo.utils as utils
import road_generation_gazebo.generates as generates

def main(road_pts, road_close, offset, offset_npts, offset_var, doplot ,model, file_name):
   pass #there is some code here

if __name__ == '__main__':

  # Initialize the node and name it.
  rospy.init_node('world_creation', anonymous=True, disable_signals=True)

  # Getting parameters
  metadata = rospy.get_param('~metadata')
  road_close=metadata['close']
  if metadata['mode'] == 'function':
    if metadata['geometry'] == 'ellipse':
      road_pts = generates.ellipse(metadata['radius']
                                  ,metadata['RADIUS']
      )
  elif metadata['mode'] == 'waypoints':
      road_pts = metadata['points']
  else:
    raise ValueError('Not expected mode...')

  main(road_pts=road_pts
      ,road_close=road_close
      ,offset=rospy.get_param('~offset')
      ,offset_npts=rospy.get_param('~offset_npts')
      ,offset_var=rospy.get_param('~offset_var')
      ,doplot=rospy.get_param('~doplot')
      ,model=rospy.get_param('~model')
      ,file_name =rospy.get_param('~file_name')
  )

and the launch file used is;

<launch>
<node name="world_creation" pkg="road_generation_gazebo" type="road_gazebo.py" required="true" output='screen'>
<!--node name="world_creation" pkg="road_generation_gazebo" type="road_gazebo.py"-->
  <rosparam command="load" file="$(find road_generation_gazebo)/yaml/metadata.yaml" />
  <param name="doplot" value="true" />
  <param name="offset_road_add_noise" value="true" />
  <param name="offset" value="5.0" />
  <param name="offset_npts" value="100.0" />
  <param name="offset_var" value="1.5" />
  <param name="model" value="bush" />
  <!--param name="model" value="cylinder"/-->
  <param name="file_name" value="custom.world" />
</node>
</launch>

I tried the command rospy.signal_shutdown(reason), but the red message was not suppressed.

2018-07-08 15:51:46 -0500 received badge  Famous Question (source)
2018-06-19 02:20:55 -0500 received badge  Famous Question (source)
2018-06-14 05:05:21 -0500 received badge  Taxonomist
2018-06-04 01:23:52 -0500 marked best answer slam_gmapping installation

Hello all, I am doing the tutorial How to Build a Map Using Logged Data which requires the use of gmapping. Well, I do not know how to install it. I found an installation option via apt-get but I would like to install from the git repository. The gmapping ROS package is called slam_gmapping and from its web page the git repository address available is https://github.com/ros-perception/sla... .

Someone can give me instructions on how to install slam_gmapping package via clonning the its repository?

Thanks

2018-05-15 14:47:08 -0500 marked best answer Rviz | tf | scan - (No transform to fixed base)

Hello all, I'm facing issues with scan data visualization on rviz. The following pictures show the problem:

image description

image 1


image description

image 2


As we can see from image 1, the transformation between the laser and base_link frames is defined, nevertheless rviz does not find this transformation and so can not display the scan data. To be more precisely, the reported message is:

Transform [sender=unknown_publisher]

and in sequece

For frame [laser]: No transform to fixed frame [base_link]. Tf error: [Lookup would require extrapolation to the future. Requested time 1469464365.119867794 but the latest data is at time 1469463838.127784645, when looking up transform from frame [laser] to frame [base_link]]

Well, I know that a lot of problems of visualizing data in rviz is related with timestemp and I a read a bunch of topic theads here, in the forum, but I do not realize how to solve this issue.

Here goes additional information and pictures:

image description

The command:

rosrun tf tf_echo laser base_link

and

rosrun tf tf_echo base_link laser

runs without problem. But the command:

rosrun tf tf_monitor laser base_link

return a strange message that is:

RESULTS: for laser to base_link Chain is: odom -> base_link -> base_link -> base_link -> base_link -> base_link -> base_link -> base_link -> base_link ->

base_link Net delay avg = 0.350788: max = 0.548574

Frames: Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309 Frame: base_link published by unknown_publisher Average Delay: 0.400253 Max Delay: 0.400309

All Broadcasters: Node: unknown_publisher 256.402 Hz, Average Delay: 0.400246 Max Delay: 0.40031

as we can see, there is a strange loop behavior in the Chain (first line)

The using multiple machines, so maybe there is a problem with synchronization.

Any clue to where should I start or to what should I do to resolve this???

Thanks in advance!!!

2018-05-15 14:47:08 -0500 received badge  Teacher (source)
2018-05-15 14:47:08 -0500 received badge  Self-Learner (source)
2018-03-25 12:15:47 -0500 received badge  Famous Question (source)
2018-03-18 23:20:54 -0500 received badge  Famous Question (source)
2018-03-15 00:42:47 -0500 received badge  Famous Question (source)
2018-02-08 02:20:06 -0500 received badge  Notable Question (source)
2017-12-29 10:18:11 -0500 received badge  Famous Question (source)
2017-12-21 14:05:11 -0500 received badge  Notable Question (source)
2017-12-10 16:25:22 -0500 received badge  Popular Question (source)
2017-12-10 06:43:33 -0500 commented answer How to properly shutdown a node from command coded in the script of the same node

The first option did not work, i.e sys.exit(0). About the second one, what could be this exit sign?

2017-12-10 04:10:11 -0500 asked a question How to properly shutdown a node from command coded in the script of the same node

How to properly shutdown a node from command coded in the script of the same node I have a simple ros application that i

2017-12-10 04:10:08 -0500 asked a question How to properly shutdown a node from command coded in the script of the same node

How to properly shutdown a node from command coded in the script of the same node I have a simple ros application that i

2017-12-10 04:09:47 -0500 asked a question How to properly shutdown a node from command coded in the script of the same node

How to properly shutdown a node from command coded in the script of the same node I have a simple ros application that i

2017-12-06 15:02:28 -0500 received badge  Popular Question (source)
2017-12-06 13:40:23 -0500 marked best answer How performe rosrun on joint_state_publisher

I have a launch file that launches a URDF based model on gazebo which has flexible joints (not fixed) and launches the robot_state_publisher node. Well, I would like to control this joints through the GUI interface provided by the joint_state_publisher and for this, at first, I tried, after launching the URDF based model, the following command:

rosrun joint_state_publisher joint_state_publisher

It did not work and the retrieved error message was:

Traceback (most recent call last):
  File "/opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher", line 432, in <module>
    jsp = JointStatePublisher()
  File "/opt/ros/kinetic/lib/joint_state_publisher/joint_state_publisher", line 45, in __init__
    robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
    return expatbuilder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
    return builder.parseString(string)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
    parser.Parse(string, True)
TypeError: Parse() argument 1 must be string or read-only buffer, not None

Although I understand the error message I do not know what to do to solve it. I do not know what should be this string.

The important of all of this is that I want to initialize the GUI interface to control the flexible joints and I do not know how to do it and any help is welcome. The solution could be via launch file also.

ps. 1: The robot description is loaded in the parameter mkz/robot_description

ps. 2: The currently launch file is:

<?xml version="1.0"?>
<launch>
  <arg name="world_file" default="$(find road_generation_gazebo)/worlds/custom.world"/>

    <!--launches URDF based model-->
    <include file="$(find vero_sim)/launch/vero_sim.launch">
        <arg name="world_file" value="$(arg world_file)"/>
    </include>

  <include file="$(find vero_sim)/launch/rviz.launch"/>
</launch>