Gazebo | Ignition | Community
Ask Your Question
0

Physically Attach Kinect Camera to TurtleBot 3 Waffle Gazebo Simulation

asked 2023-07-17 15:43:50 -0500

Hi All,

I'm pretty new to ROS and Gazebo so please forgive me.

I have followed this tutorial [http://classic.gazebosim.org/tutorial...] 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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-18 20:02:26 -0500

Veerachart gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-07-17 15:42:47 -0500

Seen: 111 times

Last updated: Jul 18 '23