ROS2 package to visualize the robot kinematics with RVIZ for simulation or digital using TF2 and URDF.
- Framework: ROS2 Humble (desktop)
- launch_utils
- python3-pykdl
Note: Install launch_utils in your workspace before follow this step
cd <path to your workspace>/src/
git clone https://github.com/Robotic-Neck/robotic_neck_viz.git
cd ..
colcon build --packages-select robotic_neck_viz
sudo apt install python3-pykdl
Install, init and update rosdep, in case you haven't
sudo apt-get install python3-rosdep
sudo rosdep init
rosdep update
Install dependencies
cd <path to your workspace>/
rosdep install -i --from-path src --rosdistro humble -y
ros2 launch robotic_neck_viz robotic_neck_urdf.launch.py
Now you can control the platform orientantation by rqt_reconfig.
The IK are getting using the Python Kinematics and Dynamics Library in the neck_joint_publisher node. This node publish the JointState, which have a list of the names of the joints and their revolution (in radians) or prismatic (in meter) positions.
If you want to learn how set roll and pirch parameters by code you can check this tutorial about global paramters.