-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates from @divbugger to be reviewd #26
Conversation
Extracts source repo from wiki and generates model out of it
clangTest.py
Outdated
# if "/home/divya/ros2_ws/build" in str(cursor.location): | ||
# continue | ||
|
||
if ("/home/divya/ros2_ws/src/ros_tutorials/turtlesim/" in str(cursor.location)) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
haros_runner.py
Outdated
pkgName = 'aruco_ros' | ||
NodeName = '--all' | ||
typeOfRequest = 'node' | ||
pathToOutput = "/home/divya/ros2_ws/runner_op" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
haros_runner.sh
Outdated
then | ||
if [ "${2}" = "--all" ] | ||
then | ||
python /ros_model_extractor.py --package "$1" --"${3}" --model-path "${4}" --ws "${5}" --repo $model_repo -a>> extractor.log | ||
python /home/divya/Documents/Master_Thesis/ros_model_extractot_fork/ros-model-extractors/ros_model_extractor.py --package "$1" --"${3}" --model-path "${4}" --ws "${5}" --repo $model_repo -a>> extractor.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
haros_runner.sh
Outdated
else | ||
python /ros_model_extractor.py --package "$1" --name "$2" --"${3}" --model-path "${4}" --ws "${5}" --repo $model_repo>> extractor.log | ||
python /home/divya/Documents/Master_Thesis/ros_model_extractot_fork/ros-model-extractors/ros_model_extractor.py --package "$1" --name "$2" --"${3}" --model-path "${4}" --ws "${5}" --repo $model_repo>> extractor.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
haros_runner.sh
Outdated
then | ||
if [ "${2}" = "--all" ] | ||
then | ||
python3 /ros_model_extractor.py --package "$1" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo -a >> extractor.log | ||
python3 /home/divya/Documents/Master_Thesis/ros_model_extractot_fork/ros-model-extractors/ros_model_extractor.py --package "$1" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo -a >> ${4}/extractor.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
haros_runner.sh
Outdated
else | ||
python3 /ros_model_extractor.py --package "$1" --name "$2" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo>> extractor.log | ||
python3 /home/divya/Documents/Master_Thesis/ros_model_extractot_fork/ros-model-extractors/ros_model_extractor.py --package "$1" --name "$2" --"${3}" --model-path "${4}" --ws "${5}" --path-to-src "$path_to_src_code" --repo $model_repo>> ${4}/extractor.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, avoid hardcoded paths.
output.log
Outdated
@@ -0,0 +1,9049 @@ | |||
2023-08-30 18:39:09,249 - ----------new value----------- | |||
Cursor Kind:CursorKind.NAMESPACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file can be removed.
ros_metamodels/ros_metamodel_core.py
Outdated
@@ -0,0 +1,324 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is duplicated. It was taken from https://github.com/ipa320/ros_model_parser/tree/master/src/ros_metamodels
ros_metamodels/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is duplicated, taken from https://github.com/ipa320/ros_model_parser/tree/master/src/ros_metamodels
if "Service" in str(call) and "::srv::" in str(call): | ||
#print(call) | ||
if "Service" in str(call) or "::srv::" in str(call): | ||
print(call) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is only used for debug purposes
@@ -308,7 +309,7 @@ def extract_primitives(self, node, parser, analysis, RosModel_node, roscomponent | |||
if node.language == "cpp": | |||
for call in (CodeQuery(gs).all_calls.get()): | |||
if "Publisher" in str(call): | |||
#print(call) | |||
print("Printing calll========================", call) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is only used for debug purposes
ros_model_generator/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ros_model_parser/__init__.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ros_model_parser/model_comparator.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ros_model_parser/rosmodel_parser.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ros_model_parser/rossystem_parser.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@divbugger I have added some review comments to you changes.
Please address them.
Also, please add some documentation about how to use the new scripts.
f0cb23d
to
7238513
Compare
superseded by #28 |
No description provided.