Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.

added math symbols and some standard data types for python evaluation#793

Merged
dirk-thomas merged 1 commit intoros:kinetic-develfrom
ubi-agni:roslaunch-math-expressions
Apr 13, 2016
Merged

added math symbols and some standard data types for python evaluation#793
dirk-thomas merged 1 commit intoros:kinetic-develfrom
ubi-agni:roslaunch-math-expressions

Conversation

@rhaschke
Copy link
Copy Markdown
Contributor

... as discussed in #784 (comment)

_eval_dict={'true': True, 'false': False, 'True': True, 'False': False, '__builtins__': {},
_eval_dict={'true': True, 'false': False, 'True': True, 'False': False,
'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int']},
'env': _eval_env, 'optenv': _eval_optenv, 'find': _eval_find}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block becomes more difficult to read as it grows. Can you update it to:

eval_dict = {
    'true': True, 'false': False,
    'True': True, 'False': False,
    '__builtins__': {k: __builtins__[k] for k in ['dict', 'float', 'int', 'list', 'map', 'str']},
    'env': _eval_env, 'optenv': _eval_optenv,
    'find': _eval_find
}

@dirk-thomas
Copy link
Copy Markdown
Member

One test failed.

@rhaschke
Copy link
Copy Markdown
Contributor Author

The failed tests are unrelated to roslaunch:

throttle: /usr/include/boost/thread/pthread/recursive_mutex.hpp:113: void boost::recursive_mutex::lock(): Assertion `!pthread_mutex_lock(&m)' failed.

@dirk-thomas
Copy link
Copy Markdown
Member

@rhaschke rhaschke force-pushed the roslaunch-math-expressions branch from fc3dec2 to 9888616 Compare April 13, 2016 19:26
@rhaschke
Copy link
Copy Markdown
Contributor Author

Oops. I missed that one. Hopefully fixed now. And squashed ;-)

@dirk-thomas
Copy link
Copy Markdown
Member

Thank you!

@dirk-thomas dirk-thomas merged commit c9fa90f into ros:kinetic-devel Apr 13, 2016
@rhaschke rhaschke deleted the roslaunch-math-expressions branch April 14, 2016 12:09
rsinnet pushed a commit to MisoRobotics/ros_comm that referenced this pull request Jun 19, 2017
added math symbols and some standard data types for python evaluation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants