Questions tagged [best-practices]
The best-practices tag has no usage guidance.
60 questions
1
vote
0
answers
35
views
TF2 Best Practices for large transforms trees
I've been using ROS2 for a while now, but mostly in projects which don't involve large transform stacks. Recently I've started a project involving drilling holes in many locations ~100+ with multiple ...
1
vote
1
answer
64
views
Under what circumstances should I use QoS SensorData / Best Effort?
I found these links addressing the intention and the design of the QoS policies:
https://design.ros2.org/articles/qos.html
https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Quality-of-...
2
votes
1
answer
137
views
ROS2 data consumer/aggregator pattern
I'm fairly new to ROS2 after having worked with ROS for a number of years.
A typical pattern we would often use was to have a ROS node subscribe to a number of inputs, and then combine and process ...
0
votes
1
answer
273
views
[ROS2] Best Practices: /rosout versus /diagnostics
I want to monitor the status of my different ROS2 nodes and act accordingly if something happens.
Some of these nodes are hardware drivers, while others are not, working on things such as image ...
0
votes
2
answers
230
views
[ROS2] Best practice for catching all exceptions for logging
I am creating a robot with ROS2 foxy that is in the field, and therefore not monitored all the time.
To help with debugging any eventual bugs/crashes that are unaccounted for, I was thinking of ...
0
votes
1
answer
12
views
Ensuring mutual exclusion between different actions
Hi!
I'm looking for a good way to ensure that different actions do not run at the same time.
Let's say we have a robot that can do different actions, such as moving and making a measurement. It seems ...
0
votes
1
answer
53
views
Different goals in one action server
I have a bit of an issue trying to figure out the best way to implement an action server with different goals. Is it an acceptable practice to use enums if goals are very different from each other or ...
0
votes
1
answer
9
views
ROS Message Best Practices
Hey there guys,
I am quite new to ROS and have not been involved in bigger projects. However I am confronted with creating one on my own. Working through the tutorials and some literature some of my ...
0
votes
1
answer
5
views
Best practice for creating new frame names?
I have a simple two-wheeled platform, and I'm trying to publish ultrasonic range data via the standard range message type.
This message type requires a header with a frame_id. The sensors are attached ...
0
votes
1
answer
16
views
Best practices for hardware package organization?
Hello,
I have recently started to invest significant time into developing ROS packages for my work and have a question regarding best practices and/or suggestions when it comes to code organization. ...
0
votes
1
answer
3
views
Topic for motor current
Hi everyone,
is there a standard topic to output currents used by a motor? I know i can give efforts of motors in the joint state message but i also would like to provide the raw current values of the ...
0
votes
1
answer
25
views
Correct way to use Costmap2DROS
I have an "algorithm" node, which designs a path for a turtlebot to follow based on a static_map being published by a map_server.
Inside my algorithm node, I instantiate a Costmap2DROS ...
0
votes
1
answer
7
views
Best practices for organizing a project
Hello all,
Sorry for the long winded explanation but my thoughts are a bit scattered on this.
I'm fairly new to ROS. I've been working with it for about a month and I feel I'm beginning to understand ...
0
votes
1
answer
20
views
Compressed camera images from rosbag to matlab
I have a bag file containing lots of sensor messages, including compressed camera images. I would like to use this stream of camera images in MATLAB.
I know of two possible approaches: either by ...
0
votes
1
answer
3
views
How to orchestrate automatic multiple (non-)ros component based system start?
Problem/Scenario
I am trying implement a way to automatically bootstrap/start a complex system
that uses diverse ros and non-ros components. My web-search lead me to
roslaunch, which seems to be most ...
0
votes
2
answers
8
views
Does rosdep support installing dependencies from PPAs?
This is a fresh post regarding the question raised here.
Basically, I'd like to know if installing ROS package dependencies from a third-party apt repository is supported/recommended. I understand ...
0
votes
1
answer
33
views
Best practices for setting up catkin_make install for python nodes
I am currently updating my code from rosbuild to catkin as I switch from Fuerte to Groovy.
Current setup: Ubuntu 12.04, Groovy
I am looking for best practices for packages with python nodes and ...
0
votes
1
answer
10
views
Best practice for online re-configuration between nodes
Dear all,
I'm looking for the best way to achieve the following (in cpp on Fuerte).
At the moment, I have one node which should be dynamically reconfigurable (i.e.: start, stop, set camera frame rate)....
0
votes
2
answers
15
views
Rule/practice for the location of storing config files
On Ubuntu Quantal with Groovy on my home dir, I see hidden dirs:
.gazebo
.ros (might be used for storing logs only?) (*1)
.rviz
Also, there could be pkgs that ...
0
votes
1
answer
22
views
rosparams vs. command line arguments for initialization
In my understanding, nodes can get initialization arguments in two ways:
rosrun or roslaunch xml files can pass command line arguments straight to the main method
the node can use the ros parameter ...
0
votes
1
answer
5
views
Guideline/rule for logging when using 3rd party libraries/framework?
For example, when writing a plugin for rqt (aka ROS GUI) that's inherently dependent on Qt, I think there's 2 choice for logging,...
0
votes
1
answer
5
views
How can I do tabletop manipulation with a 5DOF arm?
Hi, if i want to do my robotic arm to recognition an object using camera and get it
there are missing steps for me like that
Do i get the kinematics and inverse kinematics of my arm by Kinematic ...
0
votes
1
answer
11
views
Difference between using dynamic_reconfigure and using getParam at runtime
I am trying to understand the benefits of the dynamic reconfigure package. From the tutorials, it seems like it creates a new server to handle a fixed number of changing parameters.
What is the ...
0
votes
1
answer
1
view
ROS_Environments for Hector_SLAM
I'm in the process of learning ROS with a specific target of using Hector_SLAM. I'm using rosws and have made workspaces, directories, etc. I am now exploring Hector_SLAM with its multiple stacks and ...
0
votes
1
answer
3
views
Sensor Topic Conventions
We have a sensor that will be used in several locations in a robot (e.g. multiple instances of a single hardware device). Is there a preferred naming convention for message topics under these ...
0
votes
1
answer
121
views
How do I test the ROS version in Python code?
This has been asked for C++ (http://answers.ros.org/question/9562/how-do-i-test-the-ros-version-in-c-code/) but it would be good to know what the correct way to do this is in Python.
There is a python ...
0
votes
1
answer
109
views
How to debug nodelet (manager) crashes?
Are there best practices regarding debugging crashes of nodelets and / or the manager? I'm trying to load ~30 nodelets into one manager and experience seemingly random crashes. Is there a(n implicit) ...
0
votes
3
answers
4
views
Avoiding overhead when nothing subscribed
Formerly entitled "Does ROS publish messages if no nodes are subscribed"
I'm making a node to process data from a kinect and return a transform. I'll only need the transform message every ...
0
votes
1
answer
12
views
Which Python doc tool works better with ROS: Epydoc or Sphinx?
I have no experience with either, and would appreciate your advice. ROS supports both, so I would expect both to work reasonably well.
What do you like or dislike about Epydoc or Sphinx?
I am looking ...
0
votes
2
answers
4
views
Compiling [or not] a package before pushing to repo
Hi everybody,
I realized that during compilation time there will be a CMakeCache created; which is specific to our machine. Hence if we push the package (after compiling it) to a repo and someone else ...
0
votes
1
answer
15
views
how to stop the robot if something goes wrong
I am trying to setup a diagnostic mechanism on my robot so that it will stop if something goes wrong: a sensor stops working, the TF tree becomes too old, some critical node dies, etc.
I am wondering ...
0
votes
1
answer
4
views
How to use configuration files for identical robots?
I have a few configuration files containing calibrations, configurations, camera_infos for a set of identical robots.
Currently, the launch files will read in the computer's hostname as an environment ...
0
votes
1
answer
4
views
Rosbag: Recording configurations or regenerate later?
I've been wondering what's the ideal way to deal with changing configurations that get published over the wire. This can get very complex, but I'm hoping someone has experience with this (I'm sure ...
0
votes
2
answers
47
views
Dynamic reconfigure default parameters
I am writing a node which accepts certain parameters. I would like to be able to pass them through a launch file, as well as make them dynamically reconfigurable.
What are the best practices regarding ...
0
votes
1
answer
1
view
Question about generalizing a system
This question is about the best practices when generalizing a working ROS stack. I have a system that has many nodes working together to control a dynamic system. There is a vision processing node, ...
0
votes
2
answers
39
views
Best Practice: URDF descriptions, real robots, gazebo plugins and dependencies
Most complex URDF models use quite a few gazebo plugins. This often means that a dependency to "gazebo_plugins" (or other plugins) exists in the manifest.xml, which in turn means the ...
0
votes
1
answer
2
views
How to document actionlib interface / Best practice for messages from .action files
I want to document the action interface in nao_driver which uses custom actions defined in nao_msgs. However, the messages themselves are generated from the .action files and this does not seem to ...
0
votes
2
answers
4
views
How to avoid hardcoding package name in python?
#!/usr/bin/env python
PACKAGE_NAME = 'puddingPackage'
import roslib; roslib.load_manifest(PACKAGE_NAME)
:
:
Other than declaring in each ...
0
votes
1
answer
1
view
Nested stack dependency
Assume stack A depends on ros stack and its stack.xml file has " and assume that I create another stack B which depends on stack A and stack ros. If B's stack.xml specifies , does stack B also ...
0
votes
2
answers
2
views
What to publish from a new camera driver
Hi!
im want to write camera driver for ROS. and got some question:
ive read page about ROS camera drivers
and did not understand - what type of image have to publish driver: as is image or undistored ...
0
votes
1
answer
2
views
How to declare common parameter
What is recommended ways to set common parameters in ROS?
In some of my nodes, I often want to use the same values for same purpose (e.g. subscribe/publish queue). Right now I'm setting parameters in <...
0
votes
2
answers
58
views
Significance of ros::spinOnce()
Hi,
Can somebody explain what is the actual significance of the ros::spinOnce(). How is it useful?
What are the situations where its impact is higher?
And also difference between
ros::spin()
ros::...
0
votes
2
answers
5
views
Best practice for rosdep, ubuntu packages, and others
Hello,
As already discussed in question #2701, I am working on the release of the modular_cloud_matcher package.
This package depends on libnabo and libpointmatcher, for which I provide Ubuntu ...
0
votes
1
answer
40
views
When should I use diagnostic_aggregator?
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 7
0
votes
1
answer
19
views
When should I remap topic and parameter names?
When launching nodes?
Parameters in namespaces?
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 7
Original ...
0
votes
1
answer
2
views
How to setup ROS for multi-robot domains (roscores, namespaces for nodes, tf frames)
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 3
0
votes
3
answers
2
views
When should I send geometric information over a topic as opposed to TF?
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 2
0
votes
1
answer
13
views
When should I split my code into multiple packages, and what's a good way to split it?
(Mention the advantages of message definition packages.)
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 9
0
votes
3
answers
61
views
When should I use topics vs services vs actionlib actions (vs dynamic_reconfigure)?
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 40
0
votes
1
answer
3
views
I have a mobile robot that isn't supported by ROS. How should I structure the driver node(s) to expose my robot's integrated sensors and actuators?
Please help in writing up a ROS best practice.
Originally posted by mmwise on ROS Answers with karma: 8372 on 2011-11-07
Post score: 5
Original comments
Comment by Gonçalo Cabrita on 2012-08-30:
...