-
Notifications
You must be signed in to change notification settings - Fork 311
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
Panda with mobile robot gazebo crash #313
Comments
Hi @kosmonauta144, interesting problem. This is definitely the right place for the issue. Out of the blue I don't have an immediate solution. But what seems a bit strange to me is that the arm works independently for you. Actually it shouldn't because for simulating our robot in gazebo you need to provide the Instead of including the <robot name="mobile_platform" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find dingo_description)/urdf/dingo.urdf.xacro" ns="platform"/>
<xacro:include filename="$(find franka_description)/robots/panda/panda.xacro"/> <!-- only include the macro -->
<!-- instantiate the arm -->
<xacro:franka_robot arm_id="arm" gazebo:="true" />
<!-- ... rest of your urdf .. -->
</robot> The There is one caveat to this, though. With providing franka_ros/franka_description/robots/common/franka_robot.xacro Lines 38 to 44 in 2d458ab
Another thing is probably this: franka_ros/franka_gazebo/src/franka_hw_sim.cpp Lines 213 to 218 in 2d458ab
Since the Let me know if any of that works for you. Probably some of these changes will have to go into Thanks for reporting |
Hi @gollth , thank you for your suggestions, I cheated a little bit with this gazebo:=true parameter and I locally removed the part with adding world link and needed joint and I do it outside the panda.urdf.xacro in additional urdf file
that's why panda is working alone. When I try to launch mobile platform with arm attached, I use xacro file with link connecting base_link and panda_link0 Also, I tried your idea with changing "==" to ">=" and recompiling and the error disappeared, but I am still getting errors and gazebo crashed with information
during tests, I noticed an error which occurs everytime I try to launch both mobile robot and arm
and I am wondering if it can be a hw_transmission problem and I found this issue https://github.com/ros-simulation/gazebo_ros_pkgs/issues/297 in gazebo_ros_control and I am wondering if i need hw_transmission interface if I only use panda in simulation? Tommorow I will try to isolate both control plugins with this https://github.com/ipa320/cob_gazebo_plugins/tree/indigo_dev/cob_gazebo_ros_control and I will let you know about the result. also, if you have time and you would like to try to check the error by yourself, we put the code in additional repo with clones of needed repos for working and they are available here with instruction how to launch everything |
Hey @kosmonauta144, I finally got some time to investigate your issue. It seems your problem is actually a bug inside I created a PR which could solve your problem, can you please try to pull that branch and see if it works for you?
Aha I see ;) <robot name="mobile_platform_with_arm">
<xacro:include filename="$(find dingo_description)/urdf/dingo.urdf.xacro" ns="platform"/>
<xacro:include filename="$(find franka_description)/robots/common/franka_robot.xacro" />
<!-- instantiate your platform here. Assuming it has a link called `base_link` -->
<!-- Attach `fr3_link0` to `base_link`, 25cm above it -->
<xacro:franka_robot
robot="fr3"
parent="base_link"
base_xyz="0 0 0.25">
</xacro:franka_robot>
</robot> Would be great if you can also test that out and give us feedback. Hope this helps |
Hi @gollth thank you for your reply, I will check this PR this weekend and let you know if it solve the issue. |
Any news on this @kosmonauta144 ? |
Hi, I tried to use new package but I am failing to check the urdf with
and I get this error
as an urdf file I used this short file
initialization of the dingo robot is included in dingo xacro file. I am still checking if I haven't messed anything up |
No worries, sorry there were some more refactorings happening at the time of my last comment. I fixed also some tests. Could you try to reset your branch to the latest commit using: cd franka_ros
git fetch
git reset --hard origin/github-\#313 Also some arguments in the URDF were renamed, so can you try to adjust your URDF like so? <?xml version="1.0"?>
<robot name="mobile_platform_with_arm" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find dingo_description)/urdf/dingo.urdf.xacro" ns="platform"/>
<xacro:include filename="$(find franka_description)/robots/common/franka_robot.xacro" />
<!-- instantiate your platform here. Assuming it has a link called `base_link` -->
<!-- Attach `fr3_link0` to `base_link`, 25cm above it -->
<xacro:franka_robot arm_id="fr3"
joint_limits="${xacro.load_yaml('$(find franka_description)/robots/fr3/joint_limits.yaml')}"
hand="true"
gazebo="true"
parent="base_link"
xyz="0 0 0.25">
</xacro:franka_robot>
</robot> Let me know if that helps |
I got the proper version, run everything and urdf_tutorial display gives proper result, but gazebo is still fighting.
Gazebo still dies with no response and the same exit code. Also the gzserver error from franka_hw_sim has again occurred :/ |
This looks like the $ rosparam get arm_id
fr3 ? If not are you including franka_hw_sim.yaml in you launch tree somewhere (for example like here) If that doesn't help can you please send me your launch file contents? |
Hi, I was trying to check the arm_id value, but I got the message "Parameter [/arm_id] is not set. I am including my launch file, but I don't know where I included wrong file franka_hw_sim.yaml :/ . When I commented arm_id parameter at the beginning of the launch file, I got the exception that arm_id arg has to be set and I dont understand why if it is included in xacro file which you have sent and it hasn't been called anywhere in the launch file which I use and included below |
I think you are missing the parameters from
Therefore probably two things are missing:
That is, can you try to add the following lines (A & B) to you launchfile: <launch>
<arg name="arm_id" default="fr3" /> <!-- A -->
<arg use_sim_time default="true" />
<!-- ... -->
<rosparam file="$(find franka_gazebo)/config/franka_hw_sim.yaml" subst_value="true" /> <!-- B -->
<rosparam file="$(find franka_gazebo)/config/sim_controllers.yaml" subst_value="true" ns="arm"/>
<!-- ... -->
</launch> |
Thanks for so quick reply, I add these lines and launch file, but I got an error "Tried to advertise a service that is already advertised in this node (shown below on the screenshot). Gazebo launched without errors in pause, but when I tried to play the simulation it crashed with segmentation fault (core dumped) and gazebo-4 process has died :/ while searching for the solution I found this link https://robotics.stackexchange.com/questions/21673/tried-to-advertise-a-service-that-is-already-advertised-in-this-node-leo-contr but I am not sure if dividing controllers with different namespaces could help. |
Again this is hard to debug without knowing the exacts of your launch + URDF files. Let's try this way. The following example should work. Can you save both of these files as
and start them by running It's not pretty but it combines a box with a wheel with a FX3 robot. If this works for you please back-trace the difference to your setup. <!-- test.launch -->
<?xml version="1.0"?>
<launch>
<arg name="arm_id" default="fr3" doc="Name of the robot to spawn" />
<arg name="headless" default="false" doc="Should the gazebo GUI be launched?" />
<arg name="paused" default="false" doc="Should the simulation directly be stopped at 0s?" />
<arg name="initial_joint_positions"
doc="Initial joint configuration of the panda. Specify as a list of name/value pairs in form of '-J [name-of-joint] [value-in-rad]'. Default is a 90 degree bend in the elbow"
default="-J $(arg arm_id)_joint1 0
-J $(arg arm_id)_joint2 -0.785398163
-J $(arg arm_id)_joint3 0
-J $(arg arm_id)_joint4 -2.35619449
-J $(arg arm_id)_joint5 0
-J $(arg arm_id)_joint6 1.57079632679
-J $(arg arm_id)_joint7 0.785398163397
-J $(arg arm_id)_finger_joint1 0.001
-J $(arg arm_id)_finger_joint2 0.001"
/>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="worlds/empty.world"/>
<!-- Always start in paused mode, and only unpause when spawning the model -->
<arg name="paused" value="true"/>
<arg name="gui" value="$(eval not arg('headless'))"/>
<arg name="use_sim_time" value="true"/>
</include>
<param name="robot_description"
command="xacro /tmp/test.urdf.xacro">
</param>
<rosparam file="$(find franka_gazebo)/config/franka_hw_sim.yaml" subst_value="true" />
<rosparam file="$(find franka_gazebo)/config/sim_controllers.yaml" subst_value="true" />
<arg name="unpause" value="$(eval '' if arg('paused') else '-unpause')" />
<node name="$(arg arm_id)_model_spawner"
pkg="gazebo_ros"
type="spawn_model"
args="-param robot_description -urdf -model $(arg arm_id) $(arg unpause) -z 0.0"/>
<node pkg="controller_manager"
type="spawner"
name="$(arg arm_id)_controller_spawner"
respawn="false" output="screen"
args="--wait-for initialized franka_state_controller cartesian_impedance_example_controller" />
<node pkg="controller_manager"
type="spawner"
name="$(arg arm_id)_gripper_spawner"
args="franka_gripper"
respawn="false"
/>
</launch> <!-- test.urdf.xacro -->
<?xml version='1.0' encoding='utf-8'?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="fr3">
<xacro:arg name="arm_id" default="fr3" />
<xacro:arg name="hand" default="true" />
<xacro:arg name="gazebo" default="true" />
<xacro:include filename="$(find franka_description)/robots/common/franka_robot.xacro"/>
<xacro:include filename="$(find franka_description)/robots/common/utils.xacro" />
<link name="base_link">
<visual>
<origin xyz="0 0 0.1" />
<geometry> <box size="1 1 0.1" /> </geometry>
</visual>
<collision>
<origin xyz="0 0 0.1" />
<geometry> <box size="1 1 0.1" /> </geometry>
</collision>
</link>
<link name="wheel_l">
<visual>
<geometry> <cylinder length="0.05" radius="0.1" /> </geometry>
</visual>
<collision>
<geometry> <cylinder length="0.05" radius="0.1" /> </geometry>
</collision>
<xacro:inertia-cylinder mass="1" radius="0.1" h="0.05" />
</link>
<joint name="wheel_l_joint" type="revolute">
<origin xyz="0 0.5 0.2" />
<axis xyz="0 1 0" />
<parent link="base_link" />
<child link="wheel_l" />
<limit lower="-3.14" upper="3.14" effort="100" velocity="100" />
</joint>
<xacro:franka_robot arm_id="fr3"
joint_limits="${xacro.load_yaml('$(find franka_description)/robots/fr3/joint_limits.yaml')}"
hand="true"
gazebo="true"
parent="base_link"
xyz="0 0 0.25">
</xacro:franka_robot>
<xacro:gazebo-joint joint="wheel_l_joint" transmission="hardware_interface/VelocityJointInterface" />
</robot>
|
Since I didn't hear back from you @kosmonauta144, I assume you were able to solve your issue. I will merge #321 then. Feel free to reopen the ticket if the problem persists |
Hello, I have a similar issue with a double panda, I'm just trying to launch the automatically created demo_gazebo.launch but I get this error:
my demo_gazebo:
and my dual_panda.xacro:
I tried what you have told above but now way, I cant make it work... |
Hi Everyone,
because I couldn't find any solution, I decided to write about my issue.
On ROS Noetic I try to put Panda robot on the Clearpath dingo robot.
I did it with xacro file
After running
roslaunch urdf_tutorial display.launch model:=mobile-platform-with-arm.urdf.xacro
in rviz everything looks fine, but when I try to launch everything in gazebo with this launchGazebo is launching, robot is spawned and then gzserver crashes.
franka_hw_sim checks joints to register, but because of the dingo robot, the amount of joints is bigger than 7. I tried to change namespaces for ros_control plugins in dingo and panda urdf's but I am clueless how to solve it.
I hope I asked in proper place. Separately, both robots are working, but launching them in one simulation to create mobile panda exceed my skills.
Command line after launching with errors and warnings I put in file below.
command.txt
It would be awesome if someone could give me a hint to solve this.
The text was updated successfully, but these errors were encountered: