Skip to content
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

Use MoveIt fake controller for the demo #231

Merged
merged 15 commits into from
Aug 11, 2020

Conversation

JafarAbdi
Copy link
Contributor

Description

Please explain the changes you made, including a reference to the related issue if applicable

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #231 into master will increase coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
+ Coverage   47.37%   47.44%   +0.06%     
==========================================
  Files         143      143              
  Lines       13347    13347              
==========================================
+ Hits         6323     6332       +9     
+ Misses       7024     7015       -9     
Impacted Files Coverage Δ
...dl_kinematics_plugin/src/kdl_kinematics_plugin.cpp 71.11% <0.00%> (+4.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b3eebf...01a7e5c. Read the comment docs.

Copy link
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

Great that this works so seamlessly, +1 after comments are addressed.

@henningkayser
Copy link
Member

@JafarAbdi ping

@henningkayser
Copy link
Member

When I try to run this I get the following exception:

[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[DEBUG] [launch.launch_context]: emitting event synchronously: 'launch.events.IncludeLaunchDescription'
[INFO] [launch]: All log files can be found below /home/henning/.ros/log/2020-07-22-20-13-45-824339-henning-tp480s-26040
[INFO] [launch]: Default logging verbosity is set to DEBUG
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f0a2a4a5470>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f0a2a4a5470>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7f0a200a55f8>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f0a1c1960b8>'
[DEBUG] [launch]: processing event: '<launch.events.include_launch_description.IncludeLaunchDescription object at 0x7f0a1c1960b8>' ✓ '<launch.event_handlers.on_include_launch_description.OnIncludeLaunchDescription object at 0x7f0a200a55f8>'
/home/henning/ros2/moveit2/install/run_moveit_cpp/share/run_moveit_cpp/launch/run_moveit_cpp.launch.py:23: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  return yaml.load(file)
[DEBUG] [launch]: Traceback (most recent call last):
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 53, in get_launch_description_from_any_launch_file
    return loader(launch_file_path)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
    return getattr(launch_file_module, 'generate_launch_description')()
  File "/home/henning/ros2/moveit2/install/run_moveit_cpp/share/run_moveit_cpp/launch/run_moveit_cpp.launch.py", line 71, in generate_launch_description
    fake_controller])
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch_ros/actions/node.py", line 150, in __init__
    normalized_params = normalize_parameters(parameters)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch_ros/utilities/normalize_parameters.py", line 181, in normalize_parameters
    normalized_params.append(normalize_parameter_dict(param))
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch_ros/utilities/normalize_parameters.py", line 146, in normalize_parameter_dict
    sub_dict = normalize_parameter_dict(value, _prefix=name)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch_ros/utilities/normalize_parameters.py", line 160, in normalize_parameter_dict
    normalized[tuple(name)] = _normalize_parameter_array_value(value)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch_ros/utilities/normalize_parameters.py", line 69, in _normalize_parameter_array_value
    raise RuntimeError('Failed to handle type {}'.format(repr(subvalue)))
RuntimeError: Failed to handle type {'name': 'fake_panda_arm_controller', 'joints': ['panda_joint1', 'panda_joint2', 'panda_joint3', 'panda_joint4', 'panda_joint5', 'panda_joint6', 'panda_joint7']}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_service.py", line 385, in run_async
    await process_one_event_task
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 126, in send
    return self.gen.send(value)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_service.py", line 295, in _process_one_event
    await self.__process_event(next_event)
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_service.py", line 315, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
    sub_entities = entity.visit(context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/action.py", line 108, in visit
    return self.execute(context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/actions/include_launch_description.py", line 125, in execute
    launch_description = self.__launch_description_source.get_launch_description(context)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
    self._get_launch_description(self.__expanded_location)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_description_sources/any_launch_description_source.py", line 53, in _get_launch_description
    return get_launch_description_from_any_launch_file(location)
  File "/opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 56, in get_launch_description_from_any_launch_file
    raise InvalidLaunchFileError(extension, likely_errors=exceptions)
launch.invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [py]: Failed to handle type {'name': 'fake_panda_arm_controller', 'joints': ['panda_joint1', 'panda_joint2', 'panda_joint3', 'panda_joint4', 'panda_joint5', 'panda_joint6', 'panda_joint7']}

[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: Failed to handle type {'name': 'fake_panda_arm_controller', 'joints': ['panda_joint1', 'panda_joint2', 'panda_joint3', 'panda_joint4', 'panda_joint5', 'panda_joint6', 'panda_joint7']}
[DEBUG] [launch.launch_context]: emitting event: 'launch.events.Shutdown'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f0a286f9780>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f0a286f9780>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7f0a1af1c518>'
[DEBUG] [launch]: processing event: '<launch.events.shutdown.Shutdown object at 0x7f0a286f9780>' ✓ '<launch.event_handlers.on_shutdown.OnShutdown object at 0x7f0a286e7748>'
Executing <Task finished coro=<LaunchService._process_one_event() done, defined at /opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_service.py:293> result=None created at /opt/ros/eloquent/lib/python3.6/site-packages/launch/launch_service.py:363> took 0.951 seconds

@JafarAbdi
Copy link
Contributor Author

JafarAbdi commented Jul 23, 2020

When I try to run this I get the following exception:
...

Hmm, I just tested it again and it working on my case, I'll try to clean my workspace and try again

EDIT: I tested it after removing build/install directories and it's working

@JafarAbdi
Copy link
Contributor Author

JafarAbdi commented Aug 5, 2020

This PR should be merge after we use foxy for the main branch -- it depends on https://github.com/JafarAbdi/fake_joint/tree/foxy and moveit/moveit_resources#38 and uses the master branch of https://github.com/ros-controls/ros2_controllers/

@henningkayser
Copy link
Member

Github didn't get Travis results, but build succeeded without issues (https://travis-ci.com/github/ros-planning/moveit2/jobs/370735189). Merging by hand.

@henningkayser henningkayser merged commit aca0e6e into moveit:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants