Kinovarobotics / ros2_kortex

ROS2 driver for the Gen3 Kinova robot arm
Other
51 stars 47 forks source link

Add camera to 7dof gen3 ignition sim #141

Closed abake48 closed 1 year ago

abake48 commented 1 year ago

Adds the necessary gazebo plugins to use the simulated real sense in Ignition simulation of the 7dof Kinova Gen3. Also adds a few poses to the 7dof Gen3 MoveIt config

Testing:

  1. Launch the arm in Ignition using the following command: ros2 launch kortex2_bringup kortex_sim_control.launch.py vision:=true use_sim_time:=true launch_rviz:=false
  2. Launch MoveIt and Rviz with the following command: ros2 launch kinova_gen3_7dof_robotiq_2f_85_moveit_config sim.launch.py use_sim_time:=true vision:=true sim_ignition:=true
  3. View the camera feed in Rviz by clicking "Add" > "By topic" > "/wrist_camera_mounted/image" > "Image"
  4. Move the arm to a desired pose (I used the predefined "home" pose)
  5. place an object in front of the end effector. You should be able to view it from the Rviz camera.

https://github.com/PickNikRobotics/ros2_kortex/assets/7244387/27123397-357b-486a-a6f8-f8b51dd1453b

https://github.com/PickNikRobotics/ros2_kortex/assets/7244387/e1da24bf-827c-442a-bc0c-03d74cf71d9c

https://github.com/PickNikRobotics/ros2_kortex/assets/7244387/fab20d3d-f2c2-4596-95ab-8750525bd243

abake48 commented 1 year ago

The wrist is red in the Rviz view because you are not setting the material for that mesh.

       <material name="">
          <color rgba="0.75294 0.75294 0.75294 1" />
        </material>

This should be the correct value that matches with the other links. I changed it to <color rgba="0.75294 0 0 1" />to make it red for debugging purposes