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

Can't reproduce Example 2 bringup_examples on Windows #20

Closed
dyumanaditya opened this issue Mar 11, 2021 · 11 comments
Closed

Can't reproduce Example 2 bringup_examples on Windows #20

dyumanaditya opened this issue Mar 11, 2021 · 11 comments
Labels

Comments

@dyumanaditya
Copy link

Hi,
This isn't an issue, but I'm not being able to start a successful EGM session.

I've set up a virtual controller and system with the 623-1 Multitasking, 689-1 EGM options, and used the StateMachine Add-in when I installed the robot controller system.

In Controller -> Configuration -> Communication -> Transmission Protocol I made sure that ROB_1 had type UDPUC and had Remote Address and Remote Port Number which were the same as UCDevice. Please see the image below:

Screenshot (5)

When I run roslaunch abb_robot_bringup_examples ex2_rws_and_egm_6axis_robot.launch robot_ip:=127.0.0.1
I get this in the terminal:

Click to expand
... logging to C:\Users\Dyuman\.ros\log\26b02005-8227-11eb-a143-c809a8cacd11\roslaunch-dyu-PC-11284.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://127.0.0.1:55497/

SUMMARY
========

PARAMETERS
 * /egm/egm_state_controller/publish_rate: 250
 * /egm/egm_state_controller/type: abb_egm_state_con...
 * /egm/joint_group_velocity_controller/joints: ['joint_1', 'join...
 * /egm/joint_group_velocity_controller/type: velocity_controll...
 * /egm/joint_state_controller/publish_rate: 250
 * /egm/joint_state_controller/type: joint_state_contr...
 * /egm_controller_stopper/no_service_timeout: False
 * /egm_controller_stopper/ros_control/controllers/always_ok_to_start: ['egm_state_contr...
 * /egm_controller_stopper/ros_control/controllers/ok_to_keep_running: ['egm_state_contr...
 * /egm_hardware_interface/egm/channel_1/port_number: 6511
 * /egm_hardware_interface/joint_limits/joint_1/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_1/max_velocity: 0.2
 * /egm_hardware_interface/joint_limits/joint_2/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_2/max_velocity: 0.2
 * /egm_hardware_interface/joint_limits/joint_3/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_3/max_velocity: 0.2
 * /egm_hardware_interface/joint_limits/joint_4/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_4/max_velocity: 0.2
 * /egm_hardware_interface/joint_limits/joint_5/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_5/max_velocity: 0.2
 * /egm_hardware_interface/joint_limits/joint_6/has_velocity_limits: True
 * /egm_hardware_interface/joint_limits/joint_6/max_velocity: 0.2
 * /egm_hardware_interface/no_service_timeout: False
 * /egm_hardware_interface/ros_control/controllers/always_ok_to_start: ['egm_state_contr...
 * /egm_hardware_interface/ros_control/controllers/ok_to_keep_running: ['egm_state_contr...
 * /rosdistro: noetic
 * /rosversion: 1.15.9
 * /rws_service_provider/no_connection_timeout: False
 * /rws_service_provider/robot_ip: 127.0.0.1
 * /rws_service_provider/robot_nickname:
 * /rws_service_provider/robot_port: 80
 * /rws_state_publisher/no_connection_timeout: False
 * /rws_state_publisher/polling_rate: 5
 * /rws_state_publisher/robot_ip: 127.0.0.1
 * /rws_state_publisher/robot_nickname:
 * /rws_state_publisher/robot_port: 80

NODES
  /
    egm_controller_stopper (abb_egm_hardware_interface/egm_controller_stopper)
    egm_hardware_interface (abb_egm_hardware_interface/egm_hardware_interface)
    rws_service_provider (abb_rws_service_provider/rws_service_provider)
    rws_state_publisher (abb_rws_state_publisher/rws_state_publisher)
  /egm/
    started (controller_manager/spawner)
    stopped (controller_manager/spawner)

ROS_MASTER_URI=http://127.0.0.1:11311
process[rws_state_publisher-1]: started with pid [13476]
process[rws_service_provider-2]: started with pid [14876]
process[egm_hardware_interface-3]: started with pid [11436]
process[egm_controller_stopper-4]: started with pid [3132]
process[egm/started-5]: started with pid [11080]
process[egm/stopped-6]: started with pid [3864]
[ WARN] [1615452487.933493300]: Configured default soft limits for 'joint_1': position [-3.11018; 3.11018], k: 1
[ WARN] [1615452487.936419900]: Configured default soft limits for 'joint_2': position [-1.55509; 2.59182], k: 1
[ WARN] [1615452487.939509700]: Configured default soft limits for 'joint_3': position [-3.11018; 1.29591], k: 1
[ WARN] [1615452487.942083500]: Configured default soft limits for 'joint_4': position [-6.91151; 6.91151], k: 1
[ WARN] [1615452487.944437800]: Configured default soft limits for 'joint_5': position [-2.07346; 2.07346], k: 1
[ WARN] [1615452487.946835300]: Configured default soft limits for 'joint_6': position [-6.91151; 6.91151], k: 1
[ERROR] [1615452488.585257200]: Skipped loading plugin with error: XML Document 'c:\opt\ros\noetic\x64\share\controller_manager_tests/test_controllers_plugin.xml' has no Root Element. This likely means the XML is malformed or missing..
[ WARN] [1615452489.108851600]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452499.134001100]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452509.181826700]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452519.243314600]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452529.271700800]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452539.281755200]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452549.307617800]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452559.309316600]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452569.349490100]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452579.403387900]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452589.439703800]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452599.449403700]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452609.494591200]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)
[ WARN] [1615452619.510798300]: Timed out while waiting for EGM feedback (did the EGM session end on the robot controller?)

Have I set up everything correctly? Or have I missed out somewhere?

@gavanderhoorn
Copy link
Member

If that's all you have done (ie: you haven't called any services yet, as the example explains), then I believe this would be what you'd see.

There just isn't an active EGM session yet on the virtual controller, so the driver doesn't get any feedback from it.

Hence the warning.

@dyumanaditya
Copy link
Author

dyumanaditya commented Mar 11, 2021

Thanks for your explanation, I've followed all the subsequent steps. When I get to step 5 in example 2, there seem to be 5 lines to be pasted into the terminal -- which evidently didn't work as individual commands. When I tried concatenating them together:
rosservice call /egm/controller_manager/switch_controller "start_controllers: [joint_group_velocity_controller] stop_controllers: [''] strictness: 1 start_asap: false timeout: 0.0" I got an error. What is the correct way to run step 5?

@gavanderhoorn
Copy link
Member

I got an error

just stating this is never sufficient.

@dyumanaditya
Copy link
Author

dyumanaditya commented Mar 11, 2021

This was the error in #3 (comment) :

Traceback (most recent call last):
  File "c:\opt\ros\noetic\x64\bin\rosservice", line 35, in <module>
    rosservice.rosservicemain()
  File "C:\opt\ros\noetic\x64\lib\site-packages\rosservice\__init__.py", line 749, in rosservicemain
    _rosservice_cmd_call(argv)
  File "C:\opt\ros\noetic\x64\lib\site-packages\rosservice\__init__.py", line 610, in _rosservice_cmd_call
    service_args.append(yaml.safe_load(arg))
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\__init__.py", line 162, in safe_load
    return load(stream, SafeLoader)
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\__init__.py", line 114, in load
    return loader.get_single_data()
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\constructor.py", line 49, in get_single_data
    node = self.get_single_node()
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\composer.py", line 36, in get_single_node
    document = self.compose_document()
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\composer.py", line 55, in compose_document
    node = self.compose_node(None, None)
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\composer.py", line 84, in compose_node
    node = self.compose_mapping_node(anchor)
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\composer.py", line 127, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\parser.py", line 98, in check_event
    self.current_event = self.state()
  File "C:\opt\ros\noetic\x64\lib\site-packages\yaml\parser.py", line 549, in parse_flow_mapping_key
    raise ParserError("while parsing a flow mapping", self.marks[-1],
yaml.parser.ParserError: while parsing a flow mapping
  in "<unicode string>", line 1, column 1:
    {start_controllers: [joint_group ...
    ^
expected ',' or '}', but got '<scalar>'
  in "<unicode string>", line 1, column 55:
     ... oint_group_velocity_controller] stop_controllers: [''] strictnes ...

@dyumanaditya
Copy link
Author

I think the curly brackets are missing in the example. Should it be:
rosservice call /egm/controller_manager/switch_controller "{start_controllers: [joint_group_velocity_controller] stop_controllers: [''] strictness: 1 start_asap: false timeout: 0.0}" ?

@gavanderhoorn
Copy link
Member

rosservice expects a valid YAML expression.

In a Bash session, the command line shown in the example readme does work.

You're likely using cmd.exe, which works differently.

If you can't use a regular dictionary (ie: using whitespace) then perhaps an in-line one could work, but you'd have to add commas.

I think the curly brackets are missing in the example. Should it be:
rosservice call /egm/controller_manager/switch_controller "{start_controllers: [joint_group_velocity_controller] stop_controllers: [''] strictness: 1 start_asap: false timeout: 0.0}" ?

No, there are no missing curly-braces. YAML doesn't need them. An in-line dictionary definition would need them, but you'd still need to add the commas.

@dyumanaditya
Copy link
Author

The comma separated inline dictionary worked for me on Windows. The controllers seem to time out after about a minute of being inactive, with this EGM became inactive, stopping controllers not allowed to keep running: [joint_group_velocity_controller] displayed in the terminal. Is there a way to increase this timeout threshold?

After I have published the message in step 6, am I supposed to see the robot move in RobotStudio?

@gavanderhoorn
Copy link
Member

The controllers seem to time out after about a minute of being inactive, with this EGM became inactive, stopping controllers not allowed to keep running: [joint_group_velocity_controller] displayed in the terminal. Is there a way to increase this timeout threshold?

please see #16.

After I have published the message in step 6, am I supposed to see the robot move in RobotStudio?

yes, albeit potentially very slowly, but that'd depend on how you've configured things (like EGM).

@gavanderhoorn
Copy link
Member

As it seems you got things to work, I'm going to close this issue.

I'll open a new one to track the tasks around adding more documentation for Windows.

@gavanderhoorn
Copy link
Member

Tracking in #21.

@dyumanaditya
Copy link
Author

Thanks a lot for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants