Closed YaoweiFan closed 2 years ago
Hello @YaoweiFan,
this is related to the pausing & unpausing of Gazebo. Your panda_2
gets the $(arg paused)
passed along. When you check the panda.launch
file, you see that this bool basically passes the -unpause
flag to the model spawner, which unpauses the simulation as soon as the model is loaded:
Since the ROS (1) launch is nondeterministic this means, that the simulation is started, whenever panda_2
has beed added to Gazebo. It might happen that panda_1
then takes some time until its controller is loaded. During that time, when no controller is present the robot will drift away (See issue 160 for details). When the controller is active the robot should stop drifting. You should also see that in Rviz, that as soon as the interactive marker shows up the drifting stops
To avoid this race condition I suppose you do the following:
paused
rosservice call /gazebo/unpause_physics {}
Hope this helps
Also one more hint: Your argument structure looks a bit messy. I suggest you keep the panda.launch
file unchanged and pass all custom parameters (initial joint position, controllers, x,y,z ...) in the panda_dual.launch
.
@gollth Thanks for your answer and hints. I've tried what you said, and it's really helpful to me.
If that solved your issue, please consider to close this ticket here
I want to use two panda arms in gazebo, so I write
dual_arm.launch
file referencing your guide. But I found that sometimes one panda arm moves strangely while the other is ok. This happens occasionally but really confuses me.Could you give me a hint where I am doing something wrong?
both arms are at expected configuration
the left arm is at bad configuration while the right arm is at expected configuration
panda.launch
dual_arm.launch