-
Notifications
You must be signed in to change notification settings - Fork 43
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 of Fakesystem #166
Comments
okay, so I'll try to understand your code in more detail in a bit. Just a brief question, the
Is there anything that the Essentially you are trying to use different RViz configs, is that correct? For Moveit to function with RViz, you'll have to pass specific paramters to RViz, see
|
In that case i will have to do a code similar to the one in lbr_fri_ros2_stack/lbr_bringup/launch/real.launch.py ? |
are you running in simulation or the real robot? |
Iḿ running in simulation |
okay in this case you could have a look at https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/humble/lbr_bringup/launch/sim.launch.py In this launch file, Gazebo etc is launched. You should be able to modify the RViz config to your needs
But I can see how this would not work out of the box with custom moveit configs since these configs are somewhat hard coded
Do you happen to have a different URDF etc? |
no |
Okay so you could do:
Or do you wish to avoid Gazebo? |
Do you have any code using the iiwa1a from the package br_fri_ros2_stack
where the robot from to a desired position (goal pose)? I need to do a pick
and place projec where i was planning to use the move_group to control the
robot. My idea was to use a launch file to appear the robot in the rviz and
then i would try to use a node to execute the movements of the robot. If
you could provide me with something to make my project easier, I would
greatly appreciate it.
mhubii ***@***.***> escreveu (terça, 9/04/2024 à(s) 18:19):
… Okay so you could do:
- Launch using ros2 launch lbr_bringup bringup.launch.py model:=iiwa14
moveit:=true
- Configure RViz to your needs
- Save configs: In RViz File -> Save Config As (save to your package)
- Copy paste the launch file and update the origin RViz config file to
your saved file, here:
https://github.com/lbr-stack/lbr_fri_ros2_stack/blob/036b23b2f91af70e1ca490e0c81660b6b17ae114/lbr_bringup/launch/sim.launch.py#L89
—
Reply to this email directly, view it on GitHub
<#166 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHWRKN2FOMMYFI7D7V27XZTY4QPLLAVCNFSM6AAAAABF62M222VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBVG4ZDQNRTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Yes would prefer to avoid gazebbo, amd only use rviz |
yes, you can e.g. checkout #133 (comment) Closing this issue for now, as it seems somewhat unrelated to this repo, but more general. You might need to simulated physics if you are planning to do grasping, RViz might not suffice. |
Hi i was trying to use the code from ros2 launch lbr_bringup sim.launch.py. But i changed the code to the model be iiwa14, instead of iiwa7. Here it is: from typing import List from launch import LaunchContext, LaunchDescription, LaunchDescriptionEntity from lbr_bringup import LBRMoveGroupMixin def launch_setup(context: LaunchContext) -> List[LaunchDescriptionEntity]:
def generate_launch_description() -> LaunchDescription:
I added this: ld.add_action(DeclareLaunchArgument( |
hey, you can just do ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true This will launch the simulation with the |
Yes i know, but i wanted to run it in the code. I just wanted to put in the terminal: ros2 launch lbr_bringup bringup.launch.py (i don't want to write everytime model:=iiwa14 moveit:=true) |
Ok, i already solve the problem. I had to change the default value from iiwa7 to iiwa14 in the file launch_mixin.py in lbr_description |
Hello. I noticed that if you wanted to use ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true you cant´t use the ompl planner and you cant even plan adn execute the robot in the rviz. However i changed the robot files that are in iiwa14_moveit_config to be equal to the files that were on the other packages (iiwa7_moveit_config , med7_moveit_config, med14_moveit_config). After making the changes the code ros2 launch lbr_bringup bringup.launch.py model:=iiwa14 moveit:=true worked well. Now i can use the ompl planner with iiwa using that code. You might check that package (iiwa14_moveit_config) with the others becuase that are some differencaces and that's why it wasnt wrkung the planner. Thank you for providign the lbr_fri_ros2_stack |
hm that is quite strange indeed, glad it worked for you in the end If you don't want to write it in the terminal you can create a new launch file: from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare
def generate_launch_description() -> LaunchDescription:
ld = LaunchDescription()
ld.add_action(
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
[
FindPackageShare("lbr_bringup"),
"launch",
"sim.launch.py",
]
)
),
launch_arguments={
"model": "iiwa14",
"moveit": "true",
}.items(),
)
)
return ld |
Yes, thatś a way. Thank you |
Hi @mhubii |
no worries at all @antonio1matos ! Great question! Maybe we could try integrating one of these grippers: https://github.com/PickNikRobotics/ros2_robotiq_gripper Feel free to open a new issue for that! |
ok, thank you. I will check that gripper |
Hello,
I was trying to launch the robot iiwa14 in Rviz with MoveItConfigsBuilder. I made a code similar to the launch file demo_launch that is present in moveit2 humble tutorials (ros2 launch moveit2_tutorials demo.launch.py) that is used to launch the robot panda in the rviz -> https://moveit.picknik.ai/humble/doc/tutorials/your_first_project/your_first_project.html
I tried to adapt that code to the package lbr_fri_ros2_stack using the robot iiwa14:
this is my code:
import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, OpaqueFunction
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution
from launch.conditions import IfCondition, UnlessCondition
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare
from launch.actions import ExecuteProcess
from ament_index_python.packages import get_package_share_directory
from moveit_configs_utils import MoveItConfigsBuilder
from lbr_description import LBRDescriptionMixin, RVizMixin
from lbr_bringup import LBRMoveGroupMixin
def generate_launch_description():
def launch_setup(context, *args, **kwargs):
In this code in the line: default_value="miariiwa1.rviz", I call the rviz file miariiwa1.rviz that itś not present in the package br_fri_ros2_stack. That code was created in a other package that i create called "miar_robot" however the miariiwa1.rviz code is attached below.
miariiwa1.zip
The code works. The robot appears in the rviz and i can use the command Plan for the robot plan a trajectory (using the planner OMPL for example) however the command Execute or Plan & Execute doesnt work. I think itś because moveit itś not reading the controller manager cus when i run the launch file appears in the terminal: [spawner-6] [INFO] [1712674899.497416360] [spawner_joint_state_broadcaster]: Waiting for ‘/controller_manager’ node to exist . Somehow i think moveit itś not reading the file: # ros2_control using FakeSystem as hardware
ros2_controllers_path = os.path.join(
get_package_share_directory("lbr_ros2_control"),
"config",
"lbr_controllers.yaml",
)
The text was updated successfully, but these errors were encountered: