Interbotix / interbotix_ros_rovers

ROS Packages for Interbotix Rovers
BSD 3-Clause "New" or "Revised" License
31 stars 31 forks source link

[Bug]: Robot not loading in Rviz #70

Closed psykaunot closed 1 month ago

psykaunot commented 1 month ago

What happened?

I was trying to use the robot for mapping in Habitat-Sim. I have a model of the robot loaded in Habitat, thus I needed to have the model in Rviz.

I launch the "xslocobot_description.launch " file from my own custom launch file with the argument specified:

roslaunch habitat_ros locobot.launch robot_model:=wx250s use_joint_pub_gui:=true

However, I have the error shown in the ### Relevant log output

To solve I changed the argument in "xslocobot_description.launch" to <arg name="arm_model" default="mobile_wx250s"/>

It solved the issue but when Rviz opened, I had the following and I can't load the entire robot:

image

Additionally, If I changed the rvizframe to map or odom, the robot is not loaded.

Robot Model

locobot_wx250s

Operating System

Ubuntu 20.04

ROS Distro

ROS 1 Noetic

Steps To Reproduce

No response

Relevant log output

`roslaunch habitat_ros locobot.launch robot_model:=wx250s use_joint_pub_gui:=true ... logging to /home/psy/.ros/log/2b1bd27e-2e44-11ef-a915-c500e0d9d08e/roslaunch-renoir.math.unipd.it-788170.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

RLException: while processing /home/psy/socialnav_ws/src/habitat_ros/interbotix_xslocobot_descriptions/launch/xslocobot_description.launch: Invalid tag: list index out of range.

Arg xml is The traceback for the exception was written to the log file`

Additional Info

No response

lukeschmitt-tr commented 1 month ago

This is likely because you're not reporting joint states from habitat. All fixed transforms have been loaded in, but because the revolute and prismatic joints don't "know where they are", they're whited out and at the origin in RViz.

We do not support the use of habitat. I would advise looking at their documentation for further support.

psykaunot commented 1 month ago

But normally, if I'm not using any simulation environment (Gazebo, Habitat, whatever), it should be able to be loaded in Rviz

lukeschmitt-tr commented 1 month ago

If you'd like to just display a virtual model of the robot in RViz, you can set the use_joint_pub_gui launch arg to true. This launches the joint state publisher GUI that can be used to set the joint state of any non-fixed joint on the robot.

psykaunot commented 1 month ago

You're right I completely forgot about that parameter. However, why is the camera not loaded if the arm isn't? Additionally, is it possible to remove the arm and use it? I tried several times to remove the arm arguments from the description file and the locobot.urdf.xacro but without success

lukeschmitt-tr commented 1 month ago

The camera is mounted on a non-fixed pan-tilt mechanism.

To remove the arm, you can set the robot_model launch arg to locobot_base.

psykaunot commented 1 month ago

I tried a few time but always ended up with this error: ` roslaunch habitat_ros locobot.launch robot_model:=locobot_base ... logging to /home/psy/.ros/log/a40bfec8-2fea-11ef-a915-c500e0d9d08e/roslaunch-renoir.math.unipd.it-881482.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

RLException: while processing /home/psy/socialnav_ws/src/habitat_ros/interbotix_xslocobot_descriptions/launch/xslocobot_description.launch: Invalid tag: list index out of range.

Arg xml is The traceback for the exception was written to the log file `

lukeschmitt-tr commented 1 month ago

Please provide your launch file and any modifications you've made to the default interbotix launch files.

psykaunot commented 1 month ago

Expect moving the file to a specific folder and thus changing the path, I think that nothing else was changed. Unfortunately, I need to upload a picture because I am struggling to paste the launch file image

lukeschmitt-tr commented 1 month ago

Running the following command with the default xslocobot_description.launch file, you should get the picture below:

roslaunch interbotix_xslocobot_descriptions xslocobot_description.launch robot_model:=locobot_base use_joint_pub_gui:=true

Screenshot from 2024-06-21 12-06-29

psykaunot commented 1 month ago

When I use the argument with the relaunch command, it doesn't work. However, it worked when I specified the robot_model and set the use_joint_pub_gui to true. I believe that calling the description file into another launch may affect the inputs in a certain way. Thank you for your time and patience