xArm7 & gazebo demo according to github not working

Hi there, I’m trying the xArm ROS package and I’m encountering some issues with the demo. Please find attached image regarding the problem.

I’m trying to launch gazebo with roslaunch and the beside_table demo.

roslaunch xarm_gazebo xarm7_beside_table.launch [run_demo:=true]

I could see the xarm moving in simulation for 1 second and then the model became the screenshot below.

Other times I would see the xarm collide into itself with the errors below in terminal

Error [Param.cc:451] Unable to set value [-inf inf -inf -0.017536 0.002588 0.004311] for key[pose]
Error [Param.cc:451] Unable to set value [-inf inf -inf -0.191819 0.266884 1.13027] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf inf 0.05504 0.02911 0.274008] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf inf 2.69215 1.38289 -2.47287] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf -inf -1.48924 0.417261 0.30968] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf -inf 2.59518 0.054179 -2.08981] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf inf 0.058184 0.4156 0.22604] for key[pose]
Error [Param.cc:451] Unable to set value [inf inf inf 1.90972 0.062967 1.19921] for key[pose]
Error [Param.cc:451] Unable to set value [inf -inf inf 1.60184 0.489196 0.224247] for key[pose]
Error [Param.cc:451] Unable to set value [inf -inf inf -1.03175 0.526516 0.350064] for key[pose]
Error [Param.cc:451] Unable to set value [inf -inf inf 2.79646 0.191137 -0.537595] for key[pose]
Error [Param.cc:451] Unable to set value [inf -inf inf -2.80797 0.489444 -2.70242] for key[pose]
Error [Param.cc:451] Unable to set value [-inf -inf inf -1.79925 0.370468 -0.401217] for key[pose]
Error [Param.cc:451] Unable to set value [-inf -inf inf 1.50322 0.134253 3.04663] for key[pose]
Error [Param.cc:451] Unable to set value [-inf -inf -inf 2.77783 0.131599 -1.37873] for key[pose]
Error [Param.cc:451] Unable to set value [-inf -inf -inf 1.2374 -0.752939 -0.420623] for key[pose]
gzclient: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/include/OgreAxisAlignedBox.h:252: void Ogre::AxisAlignedBox::setExtents(const Ogre::Vector3&, const Ogre::Vector3&): Assertion `(min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"' failed.
Aborted (core dumped)
[gazebo_gui-2] process has died [pid 23730, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/shueze/.ros/log/c5326ce2-e588-11e9-8cec-303a641319d8/gazebo_gui-2.log].
log file: /home/shueze/.ros/log/c5326ce2-e588-11e9-8cec-303a641319d8/gazebo_gui-2*.log

Please advise. Thank you.

What’s the version of your gazebo? If it’s gazebo 7, please upgrade to gazebo 9.

Hi, I’m not working the same way.

I used gazebo-9.13.1 and launched it with the following command.

roslaunch xarm_gazebo xarm7_beside_table. launch run_demo:=true

When it is started, it will be in the following state.
It does not seem to become the movement implemented by sample_motion.cpp.

My environment:

  • Ubuntu 16.04.6 LTS (Xenial Xerus)
  • ROS Kinetic Kame
  • Gazebo 9.13.1

started roslaunch server http://ubuntu-ros:43765/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: True
 * /xarm/DOF: 7
 * /xarm/joint1_effort_controller/joint: joint1
 * /xarm/joint1_effort_controller/pid/d: 10.0
 * /xarm/joint1_effort_controller/pid/i: 5.0
 * /xarm/joint1_effort_controller/pid/p: 1200.0
 * /xarm/joint1_effort_controller/type: effort_controller...
 * /xarm/joint1_position_controller/joint: joint1
 * /xarm/joint1_position_controller/pid/d: 10.0
 * /xarm/joint1_position_controller/pid/i: 5.0
 * /xarm/joint1_position_controller/pid/p: 1200.0
 * /xarm/joint1_position_controller/type: position_controll...
 * /xarm/joint2_effort_controller/joint: joint2
 * /xarm/joint2_effort_controller/pid/d: 10.0
 * /xarm/joint2_effort_controller/pid/i: 5.0
 * /xarm/joint2_effort_controller/pid/p: 1400.0
 * /xarm/joint2_effort_controller/type: effort_controller...
 * /xarm/joint2_position_controller/joint: joint2
 * /xarm/joint2_position_controller/pid/d: 10.0
 * /xarm/joint2_position_controller/pid/i: 5.0
 * /xarm/joint2_position_controller/pid/p: 1400.0
 * /xarm/joint2_position_controller/type: position_controll...
 * /xarm/joint3_effort_controller/joint: joint3
 * /xarm/joint3_effort_controller/pid/d: 5.0
 * /xarm/joint3_effort_controller/pid/i: 5.0
 * /xarm/joint3_effort_controller/pid/p: 1200.0
 * /xarm/joint3_effort_controller/type: effort_controller...
 * /xarm/joint3_position_controller/joint: joint3
 * /xarm/joint3_position_controller/pid/d: 5.0
 * /xarm/joint3_position_controller/pid/i: 5.0
 * /xarm/joint3_position_controller/pid/p: 1200.0
 * /xarm/joint3_position_controller/type: position_controll...
 * /xarm/joint4_effort_controller/joint: joint4
 * /xarm/joint4_effort_controller/pid/d: 5.0
 * /xarm/joint4_effort_controller/pid/i: 3.0
 * /xarm/joint4_effort_controller/pid/p: 850.0
 * /xarm/joint4_effort_controller/type: effort_controller...
 * /xarm/joint4_position_controller/joint: joint4
 * /xarm/joint4_position_controller/pid/d: 5.0
 * /xarm/joint4_position_controller/pid/i: 3.0
 * /xarm/joint4_position_controller/pid/p: 850.0
 * /xarm/joint4_position_controller/type: position_controll...
 * /xarm/joint5_effort_controller/joint: joint5
 * /xarm/joint5_effort_controller/pid/d: 1.0
 * /xarm/joint5_effort_controller/pid/i: 3.0
 * /xarm/joint5_effort_controller/pid/p: 500.0
 * /xarm/joint5_effort_controller/type: effort_controller...
 * /xarm/joint5_position_controller/joint: joint5
 * /xarm/joint5_position_controller/pid/d: 1.0
 * /xarm/joint5_position_controller/pid/i: 3.0
 * /xarm/joint5_position_controller/pid/p: 500.0
 * /xarm/joint5_position_controller/type: position_controll...
 * /xarm/joint6_effort_controller/joint: joint6
 * /xarm/joint6_effort_controller/pid/d: 1.0
 * /xarm/joint6_effort_controller/pid/i: 1.0
 * /xarm/joint6_effort_controller/pid/p: 500.0
 * /xarm/joint6_effort_controller/type: effort_controller...
 * /xarm/joint6_position_controller/joint: joint6
 * /xarm/joint6_position_controller/pid/d: 1.0
 * /xarm/joint6_position_controller/pid/i: 1.0
 * /xarm/joint6_position_controller/pid/p: 500.0
 * /xarm/joint6_position_controller/type: position_controll...
 * /xarm/joint7_effort_controller/joint: joint7
 * /xarm/joint7_effort_controller/pid/d: 1.0
 * /xarm/joint7_effort_controller/pid/i: 0.05
 * /xarm/joint7_effort_controller/pid/p: 300.0
 * /xarm/joint7_effort_controller/type: effort_controller...
 * /xarm/joint7_position_controller/joint: joint7
 * /xarm/joint7_position_controller/pid/d: 1.0
 * /xarm/joint7_position_controller/pid/i: 0.05
 * /xarm/joint7_position_controller/pid/p: 300.0
 * /xarm/joint7_position_controller/type: position_controll...
 * /xarm/joint_names: ['joint1', 'joint...
 * /xarm/joint_state_controller/publish_rate: 50
 * /xarm/joint_state_controller/type: joint_state_contr...

NODES
  /xarm/
    continuous_cmds (xarm_controller/sample_motion)
    position_controller_spawner (controller_manager/spawner)
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    spawn_gazebo_model (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [5951]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 3a1add94-a886-11ea-9ae6-309c230056f2
process[rosout-1]: started with pid [5965]
started core service [/rosout]
process[gazebo-2]: started with pid [5989]
process[gazebo_gui-3]: started with pid [5994]
process[spawn_gazebo_model-4]: started with pid [5999]
process[xarm/position_controller_spawner-5]: started with pid [6000]
process[robot_state_publisher-6]: started with pid [6001]
process[xarm/continuous_cmds-7]: started with pid [6002]
[ INFO] [1591510505.219477393]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591510505.219944994]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[ INFO] [1591510505.232284219]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1591510505.232712248]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[INFO] [1591510505.239346, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller
SpawnModel script started
[INFO] [1591510505.419763, 0.000000]: Loading model XML from ros parameter
[INFO] [1591510505.421313, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Warning [parser.cc:759] XML Attribute[update_rate] in element[physics] not defined in SDF, ignoring.
[ INFO] [1591510506.239989286, 0.036000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591510506.276554058, 0.071000000]: Physics dynamic reconfigure ready.
[INFO] [1591510506.328105, 0.120000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1591510506.446039, 0.162000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1591510506.521972213, 0.185000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1591510506.543159116, 0.206000000]: Physics dynamic reconfigure ready.
[spawn_gazebo_model-4] process has finished cleanly
log file: /home/takata/.ros/log/3a1add94-a886-11ea-9ae6-309c230056f2/spawn_gazebo_model-4*.log
[WARN] [1591510535.405862, 28.497000]: Controller Spawner couldn't find the expected controller_manager ROS interface.
[xarm/position_controller_spawner-5] process has finished cleanly
log file: /home/takata/.ros/log/3a1add94-a886-11ea-9ae6-309c230056f2/xarm-position_controller_spawner-5*.log

Hi,you can refer to the article:
http://help.xarm.cc/en/articles/3970365-solve-the-problem-that-all-joints-of-the-xarm-are-at-0-in-the-gazebo

If you have not solved the problem through the method in the article, please feel free to contact us.

HI, jane

It does not work well.
The movement of sample_motion.cpp is not reflected and the arm hangs down like a GIF.
9j72q7YmcA

Hello, you can install the gazebo-ros-control, you can install it with the command below:
sudo apt-get install ros-kinetic-gazebo-ros-control

If the issue still exits,please feel free to contact us.

Hi, Jane

Thank you, it works!
I needed two more pakages.

sudo apt install ros-kinetic-ros-control
sudo apt install ros-kinetic-ros-controllers

Hello, thanks for you reply.