Move robot leg in rviz using MoveIt

asked 2021-03-03 14:16:52 -0500

Osch gravatar image

Hello experts :)

I have built a 4 legged robot with 6 DOF on every leg. (https://www.thingiverse.com/thing:100...). I am able to stream servo commands to the robot over websockets.

Goals

To make the design of movements more approachable, I want to visualize the robot in rviz and have motions planned using MoveIt by just dragging around the end of the legs and the body. Right now I am looking to achieve two things:

1) Drag around the tip of a leg in rviz and have the path planned by MoveIt.

2) Fix the feets in starting position and drag around the body of the robot.

Progress

I am using ros noetic on Ubuntu 20.04. I created a robot description in urdf (see attachments, I used a scale of 10:1 to have less zooming in during development) and validated the urdf by using check_urdf. I am able to visualize the urdf in rviz using

roslaunch urdf_tutorial display.launch model:=spider.urdf

I configured MoveIt using the MoveIt setup assistant

roslaunch moveit_setup_assistant setup_assistant.launch

Here I perfomred the following steps

  1. Load the urdf
  2. Compute the self collisions
  3. Add a virtual joint of type fixed, child link: base_link and parent frame name: world (to fix the body to the world)
  4. Add a planning group named leg_0 containing the base_link and all links of one leg (to test with moving one leg around first)
  5. Add an end effektor with the end effektor group leg_0 and parent link leg_0_2 (outmost link of the leg)
  6. Generate the configuration files

Now I can launch the MoveIt config using

roslaunch spider_moveit_config demo.launch

I see the robot drawn, I see the planning group highlighted.

Problems

I have several open questions here:

  1. I am not able to see the "drag ball" that I was able to use in the MoveIt tutorial (https://ros-planning.github.io/moveit...)
  2. How am I supposed to move the tip of the robot leg?
  3. How do I retrieve the computed joint angles?
  4. How would a MoveIt setup look for moving around the body?

Attachments

Spider urdf file: https://filebin.net/t837fj9proe21aaj

Pictures of MoveIt config and result: https://imgur.com/a/eTCTcP8

edit retag flag offensive close merge delete