GithubHelp home page GithubHelp logo

Comments (15)

Briancbn avatar Briancbn commented on July 29, 2024 2

@newcanopies
Latest version for almost everything, we tested it just two days ago.

Don't forget to add these additional lines as the follow_joint_trajectory parameters under controller.yaml following the moveit2 panda example.

pos_joint_traj_controller:
  ros__parameters:
    joints:
      -
      -
      ...
    command_interfaces:
      - position
    state_interfaces:
      - position
      - velocity

also don't forget to load the controllers in your Moveit2 launch file. Follow the example here.
https://github.com/ros-planning/moveit2/blob/c029942dbb95387ecccf10a41d48e310450d3528/moveit_demo_nodes/run_moveit_cpp/launch/run_moveit_cpp.launch.py#L135-L154

Latest Moveit2

repositories:
  # moveit2
  moveit2:
    type: git
    url: https://github.com/ros-planning/moveit2
    version: 2.1.4
  moveit_msgs:
    type: git
    url: https://github.com/ros-planning/moveit_msgs
    version: 2.0.1
  moveit_resources:
    type: git
    url: https://github.com/ros-planning/moveit_resources
    version: 2.0.2
  geometric_shapes:
    type: git
    url: https://github.com/ros-planning/geometric_shapes
    version: 2.0.2
  srdfdom:
    type: git
    url: https://github.com/ros-planning/srdfdom
    version: 2.0.2

  # ros2_control
  ros2_control:
    type: git
    url: https://github.com/ros-controls/ros2_control
    version: 0.7.0
  ros2_controllers:
    type: git
    url: https://github.com/ros-controls/ros2_controllers
    version: d989e7caa2d3e862b3e4e8e1eb7934f1f216eeae

  # warehouse
  warehouse_ros:
    type: git
    url: https://github.com/ros-planning/warehouse_ros
    version: 2.0.1

  warehouse_ros_mongo:
    type: git
    url: https://github.com/ros-planning/warehouse_ros_mongo
    version: 2.0.1

gazebo_ros2_control

repositories:
  gazebo_ros2_control:
    type: git
    url: https://github.com/ros-simulation/gazebo_ros2_control
    version: a33ea2eeb37094177103084e065626d63ce31a7d

from gazebo_ros2_control.

brennand avatar brennand commented on July 29, 2024

Did you ever fix this as I have a very similar behavior.

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

@panagelak please share a https://gist.github.com of the:

adapted UR10 xacro with the joint_trajectory_controller
moveit config

from gazebo_ros2_control.

panagelak avatar panagelak commented on July 29, 2024

@newcanopies

Hello i wasnt very familiar with gist and it seems i could only share individual files

I made a repo with my config and some simple instructions (for foxy) hope this helps

https://github.com/panagelak/ur10_gazebo_ros_control2

Hope this helps!
Thanks

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

Thank you @panagelak I'm looking into tweaking the parameters ... TBC

related #44 (comment)

related ros-simulation/gazebo_ros_demos#42 (comment)

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

are you getting the ros2 errors:

[ros2-6] ros2: error: argument Call `ros2 <command> -h` for more detailed usage.: invalid choice: 'control' (choose from 'action', 'bag', 'component', 'daemon', 'doctor', 'extension_points', 'extensions', 'interface', 'launch', 'lifecycle', 'multicast', 'node', 'param', 'pkg', 'run', 'security', 'service', 'test', 'topic', 'wtf')
**[ERROR] [ros2-6]: process has died [pid 10363, exit code 2, cmd 'ros2 control load_start_controller joint_trajectory_controller'].**
[INFO] [gzclient   -2]: process has finished cleanly [pid 10167]
``` [gzserver-1] [INFO] [1623424230.447833300] [gazebo_ros2_control]: Loading controller_manager [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 10172] [INFO] [ros2-5]: process started with pid [10298] [gzserver-1] [WARN] [1623424230.468205600] [gazebo_ros2_control]: Desired controller update period (0.01 s) is slower than the gazebo simulation period (0.001 s). [gzserver-1] [INFO] [1623424230.468415400] [gazebo_ros2_control]: **Loaded gazebo_ros2_control.** [ros2-5] usage: ros2 [-h] Call `ros2 -h` for more detailed usage. ... [ros2-5] ros2: error: argument Call `ros2 -h` for more detailed usage.: invalid choice: 'control' (choose from 'action', 'bag', 'component', 'daemon', 'doctor', 'extension_points', 'extensions', 'interface', 'launch', 'lifecycle', 'multicast', 'node', 'param', 'pkg', 'run', 'security', 'service', 'test', 'topic', 'wtf') [ERROR] [ros2-5]: process has died [pid 10298, exit code 2, cmd 'ros2 control load_start_controller joint_state_controller']. [INFO] [ros2-6]: process started with pid [10363] [ros2-6] usage: ros2 [-h] Call `ros2 -h` for more detailed usage. ... [ros2-6] ros2: error: argument Call `ros2 -h` for more detailed usage.: invalid choice: 'control' (choose from 'action', 'bag', 'component', 'daemon', 'doctor', 'extension_points', 'extensions', 'interface', 'launch', 'lifecycle', 'multicast', 'node', 'param', 'pkg', 'run', 'security', 'service', 'test', 'topic', 'wtf') **[ERROR] [ros2-6]: process has died [pid 10363, exit code 2, cmd 'ros2 control load_start_controller joint_trajectory_controller'].** [INFO] [gzclient -2]: process has finished cleanly [pid 10167] ```

from gazebo_ros2_control.

panagelak avatar panagelak commented on July 29, 2024

@newcanopies

I'm not sure why it doesn't recognize the ros2 control load_start_controller joint_state_controller/joint_trajectory_controller cli command, i think it requires to have build ros_control from source to do so (or moveit2 which include ros control).
Furthermore in this launch file on the rrbot it uses the same command on line 90 https://github.com/ros-simulation/gazebo_ros_demos/blob/ahcorde/port/ros2/rrbot_gazebo/launch/rrbot_world.launch.py

I followed this instructions to install moveit2 https://moveit.ros.org/install-moveit2/source/

P.S since i dont want to have all the moveit2 packages in my devel workspace (requiring to blacklist them etc)
i installed the moveit2 in a seperate workspace so my bashrc looks something like this (notice the --extend)

source /opt/ros/foxy/setup.bash
source ~/ws_moveit2/install/setup.bash --extend
source ~/colcon_ws/install/setup.bash

let me know if this fixes that

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

is your ros2_control source build inside colcon_ws?
or are you relying on foxy debian ros2_control?

since commenting out the controller_manager update_rate in gazebo yaml removes the instability,
could be that the URDF macros require a matching <update_rate>100</update_rate> tag
as well as correct yaml definitions of the joint state and trajectory controllers

ref. <ros2_control> tags in the URDF must be compatible with the controller's configuration

have you tried generating the ur10_gazebo_ros_control2 yamls and gazebo xacros via (the unported) ROS1 moveit setup assistant?

here's a UR5 controller yaml tweaked to hold non-zero position #44 (comment)

from gazebo_ros2_control.

panagelak avatar panagelak commented on July 29, 2024

hi @newcanopies

i experimented a little with the gazebo_controllers.yaml (on the ur10_description pkg) but it didn't seem to fix it by removing the <update_rate>

can you possibly make a pr with your fix or share your fork?

i didn't know they have release ros2_control on debian is it on testing? i have install moveit2 from source which installs ros2_control also. In colcon_ws i have only the repo i shared + gazebo_ros2_control plugin (main)

thanks a lot for your help so far, appreciate it!

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

hi @panagelak the PR is already on your repo :) with this result based on apt debian ros2_control
it is not a fix, just a diagnostic.
image

i have install moveit2 from source which installs ros2_control also

afaik, moveit2 source install relies on older version of ros2_control which doesn't interface well with Gazebo.

To test debian ros2_control try these install/remove instructions. It looks like the Rviz2 error about TF2 frame conversion is due to wrong TF2 package version overlay. It remains TBD which repo has the Gazebo/Rviz2 suitable version of TF2.

--

I just switched to debugging based on ros2_control devel packages from the demos and documentation therein.
Check the 6Dbot branch where a 2 Hz controller_manager update rate was coded in.
I tried various values (1000, 100, 50, 10, 2) but instability only stops if no update rate is set for the controller_manager. Meanwhile. each controller (state,trajectory, position) has update rates (25, 50 Hz) that may or may not need tweaking....
And may or may not need to be correspondingly referenced in the URDF < update_rate > tag of that controller.
I'm looking for documentation that clarifies this.

It's also possible some of the ros2_control packages should be included as < build > or < exec > depends under the ur10 description+control package.xml

@destogl @Briancbn @ahcorde please throw us a hint here?
This joint instability issue closely resembles the behavior videos from the Foxy API PR #44 (comment)

from gazebo_ros2_control.

Briancbn avatar Briancbn commented on July 29, 2024

@newcanopies @panagelak This is my follow-up comments. #44 (comment).

Please also refer to #54 (comment) for the workaround 1. I am still using this workaround with the latest gazebo_ros2_control for my own project.

I haven't been follow up on this issue lately, maybe @destogl and @ahcorde could provide the best way and estimated timeline in this getting resolved.

from gazebo_ros2_control.

newcanopies avatar newcanopies commented on July 29, 2024

Please also refer to #54 (comment) for the workaround 1. I am still using this workaround with the latest gazebo_ros2_control for my own project.

I hasn't been follow up on this issue lately, maybe @destogl and @ahcorde could provide the best way and estimated timeline in this getting resolved.

Thanks very much @Briancbn - which ros2_control package repo are you using and how do you exclude conflict with the older ros2_control inside moveit2 ?

from gazebo_ros2_control.

shonigmann avatar shonigmann commented on July 29, 2024

fwiw, I can build everything using the default branches for each dependency (moveit2, ros2_control, gazebo_ros2_control, etc) rather than specific commits and things now behave as expected. In #54, I mention a few pitfalls / tweaks to watch out for. But I don't think it is still necessary to build using specific versions (you of course still can if you like a bit of stability in your life😄). But with that in mind, perhaps this issue can be closed?

from gazebo_ros2_control.

dvalenciar avatar dvalenciar commented on July 29, 2024

Did you ever fix this as I have a very similar behavior.

Me too, any idea how to solve it?

from gazebo_ros2_control.

AlezzzRd avatar AlezzzRd commented on July 29, 2024

I had a very similar problem with gazebo11 and I finally solved it by adding friction and damping parameters in each joint. like
<dynamics damping="60.0" friction="4.0"/>

from gazebo_ros2_control.

Related Issues (20)

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.