Physically Attach Kinect Camera to TurtleBot 3 Waffle Gazebo Simulation
Hi All,
I'm pretty new to ROS and Gazebo so please forgive me.
I have followed this tutorial [http://classic.gazebosim.org/tutorials?tut=ros_depth_camera&cat=connect_ros] and have been successfully been able to integrate a Kinect sensor in my gazebo simulation and then visualize the point cloud of obstacles in rviz. I'm now trying to physically mount this to a turtle bot 3 waffle, so that as the robot drives around the kinect sensor moves with it and therefore the point cloud will update to represent it's current surroundings. I have followed the Kinect tutorial and installed the Kinect model in home/user/.gazebo/models. I think Ive found the turtlebot files in /opt/ros/noetic/share/turtlebot3_gazebo/models. I've inserted the following code before of the turtlebot sdf file and the kinect doesnt spawn with the robot:
<include>
<uri>model://kinect_ros</uri>
<pose>-1.999996 -0.499974 .5 0 0 0</pose>
</include>
<joint name="kinect_ros" type="fixed">
<child>camera_link</child>
<parent>base</parent>
</joint>
Any help would be greatly appreciated!
Thanks
Asked by dexter9 on 2023-07-17 15:42:47 UTC
Answers
As you mentioned the kinect model can be loaded individually, I think it's about the joint.
I think the joint's child need to be something like kinect_ros::camera_link
(if the kinect_ros model is named internally as kinect_ros
).
When a model is nested in another model (through the <include>
tag), the link's names in the nested model are prefixed with the model's name (<name>
tag inside the <include>
if provided, else it's inside that model's <model name="model_name">...
) and ::
, therefore the names provided to the joint need to follow.
If this is the case, starting the world in pause mode and the kinect should still be there, but will fall down by the gravity when played as the joint was not created properly. Running with verbose option will show some more debug messages to help identify the problem. Selecting the robot model will also show a large bounding box down below after the fall.
Asked by Veerachart on 2023-07-18 20:02:26 UTC
Comments