Git Product home page Git Product logo

tdenewiler / node_example Goto Github PK

View Code? Open in Web Editor NEW
104.0 5.0 27.0 1.65 MB

ROS node examples with parameter server, dynamic reconfigure, timers, and custom messages for C++ and Python.

License: BSD 3-Clause "New" or "Revised" License

C++ 45.68% Python 25.50% CMake 10.04% Dockerfile 15.24% Shell 3.54%
ros ros1 ros-node dynamic-reconfigure unit-tests code-coverage documentation continuous-integration

node_example's People

Contributors

mrmouss avatar rellfy avatar sloretz avatar tdenewiler avatar zongyaojin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node_example's Issues

a little error in rosmake about node_example

Hello tdenewiler:
when I follow your step on ROS tutorial about node_example package, after executing cmake .there is a warning, and I didn't care about it . At last rosmakedidn't complete .So I didn't get the last bin directory.I will appreciate your help if could reply as soon as possible.Below is the snapshot about the warning
screenshot from 2014-12-22 21 38 01
screenshot from 2014-12-22 21 44 30

Code coverage is not working

Hi,

I tried to reproduce your example but the travis console log shows that the code coverage is now working: "Error: No coverage report found". The command returns 0 so the build passes but the coverage actually doesn't work.

Do you have any ideas ?

"rosrun node_example pytalker.py" showing errors

Hi Thomas,

I'm trying to learn from your package, and I had a problem when running it.

So, if I do roslaunch node_example node_example.launch there is no problem, the package runs perfectly.

And if I run individual nodes after doing roscore, rosrun node_example talker, rosrun node_example listener, and rosrun node_example pylistener.py have no problem.

However, if I run rosrun node_example pytalker.py, I always get the following error msg:

$ rosrun node_example pytalker.py
Traceback (most recent call last):
File "/home/zongyao/zongyao_ws/ros_ws/src/node_example/src/pytalker.py", line 79, in
NodeExample()
File "/home/zongyao/zongyao_ws/ros_ws/src/node_example/src/pytalker.py", line 25, in init
rospy.loginfo('rate = %f', rate)
File "/usr/lib/python2.7/logging/init.py", line 1167, in info
self._log(INFO, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/init.py", line 1286, in _log
self.handle(record)
File "/usr/lib/python2.7/logging/init.py", line 1296, in handle
self.callHandlers(record)
File "/usr/lib/python2.7/logging/init.py", line 1336, in callHandlers
hdlr.handle(record)
File "/usr/lib/python2.7/logging/init.py", line 759, in handle
self.emit(record)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 176, in emit
record_message = _defaultFormatter.format(record)
File "/usr/lib/python2.7/logging/init.py", line 465, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 329, in getMessage
msg = msg % self.args
TypeError: float argument required, not str

So I was wondering where did I do wrong and if you could help me out?

Thank you very much!

Sincerely,
Zongyao

When should I use ros::init to initialize a node

Hi,
I'm a new comer to ROS and trying to use the node_example package to get some basic ideas about ros nodes. I'm confused about when to use ros::init to initialize a ros node, as I couldn't find the initialization process in talker.cpp and listener.cpp. Although the nodes talker and listener have been initialized in talker_node.cpp and listener_node.cpp respectively, these two cpp files have not been launched by any launch files. It would be appreciated if anyone could help me with this misunderstanding. It has confused me for several days.
Also, should the node name in the function ros::init(argc, argv, "my_node_name") be the same as the name of the executable file which defines the node?

rospy node crashes on changed rate

The rospy talker node crashes when the rate parameter is set to anything other than 1 and running:

roslaunch node_example node_example.launch

The error is:

Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/timer.py", line 221, in run
    r = Rate(1.0 / self._period.to_sec(), reset=self._reset)
ZeroDivisionError: float division by zero

This should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.