Namespacing hardware_interface/PositionJointInterface for multiple robots in Gazebo
I am trying to simulate three Universal Robot arms in Gazebo. I am using the official repo. I was able to spawn all the robots in Gazebo but the only the last robot(linked in the URDF) actually can move. After digging out for the problem, I noticed hardware_interface/PositionJointInterface
is not namespaced properly. So that is the reason only the robot which is linked at the end can move. I verified by changing the position of relvant joints in the URDF.
To create the issue following steps can be followed:
mkdir -p test_ws/src && cd test_ws/src
git clone https://github.com/ros-industrial/universal_robot/
catkin_create_pkg test_urdf
# Extract test_urdf.zip(attached to this post) to test_urdf package just created.
cd ..
catkin_make
source devel/setup.bash
roslaunch test_urdf ur_gazebo.launch
# In another terminal
rosrun rqt_joint_trajectory_controller rqt_joint_trajectory_controller
Currently after executing the above mentioned launch file a gazebo world with three arms will be simulated. Now only left arm can be moved as it is linked at the the end in test_urdf/urdf/test.urdf.xacro
. If another arm is taken to the last in the same URDF than that can be moved only.
The problem actually lies in defining the respective hardware_interface/PositionJointInterface
which currently is the same for everyone. As can be seen in test_urdf/urdf/arms/
right, center or left arm.
Is there any way that hardware_interface/PositionJointInterface
can be taken into namespaces respectively in xacro
files?
@gvdhoorn can you please say something for this issue?