Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source install/setup.bash not working #1

Open
javiermoviglia opened this issue Aug 2, 2022 · 6 comments
Open

source install/setup.bash not working #1

javiermoviglia opened this issue Aug 2, 2022 · 6 comments

Comments

@javiermoviglia
Copy link

Hello,

I have followed your instructions to connect Slicer with ROS but for some reason when doing source install/setup.bash in the workspace where slicer_ros2_module is located I get the following error:

not found: "/home/javier/ros2_ws/install/slicer_ros2_module/share/slicer_ros2_module/local_setup.bash"

I have tried it with ROS2 galactic and foxy but still get the same error. I suspect that the problem is in the CMakelist.txt file but maybe you have solved it in another way.

Useful information:

  • colcon build works fine (only some warnings due to vtkSlicerRos2Logic code)
  • with the two ways described to build the package (colcon build and cmake) I get the same results
  • I have tested it with both Slicer 5.0.3 and 5.1.0 (with build)
  • The files found in the path "/home/javier/ros2_ws/install/slicer_ros2_module/share/slicer_ros2_module/" are the following:

package.bash
package.dsv
package.ps1
package.sh
package.zsh

Thank you in advance for the help.

Best regards,
Javier

@javiermoviglia
Copy link
Author

I forgot to mention, that the Ros2 module can be loaded in Slicer despite the previous error, but the robot cannot be displayed.

Configuration

Debug

  • ros2 topic list
    /joint_states
    /parameter_events
    /robot_description
    /rosout
    /tf
    /tf_static

  • ros2 node list
    /robot_state_publisher
    /state_publisher
    /transform_listener_impl_55**
    /vtkSlicerRos2Logic

@adeguet1
Copy link
Collaborator

adeguet1 commented Aug 2, 2022

Regarding the script local_setup.bash not being found, I've noticed this on my end but I don't think it will cause any issues. Regarding the robot not being displayed, the current code only support geometries based on CAD files using either STL or OBJ (formats supported in Slicer). I looked at the URDF file for the R2D2 robot you're using and it's not using meshes for the visual. Excerpt:

    <visual>
      <origin xyz="0 0 0" rpy="1.57 0 0" />
      <geometry>
        <cylinder radius="0.01" length=".5" />
      </geometry>
      <material name="gray">
        <color rgba=".2 .2 .2 1" />
      </material>
    </visual>

We used two different robots for our testing, Phantom Omni and dVRK PSM. I will try to update the README ASAP to show how to use these with the SlicerROS2 module.

@javiermoviglia
Copy link
Author

javiermoviglia commented Aug 2, 2022

Thanks for the quick reply. I have just tested it with the dVRK PSM Robot from your repository but I still haven't been able to diplay this one in Slicer. An update of the README would be very helpful.

@adeguet1
Copy link
Collaborator

adeguet1 commented Aug 3, 2022

I updated the README and added some links to the Phantom Omni models. Let us know if the new instructions help. For the dVRK PSM, I need to update the ROS dVRK launch files first. I will then test with the Slicer ROS 2 module before updating the dVRK section in the README.

@javiermoviglia
Copy link
Author

it works now! (at least in ROS galactic) The trick was just hit enter on /robot_state_publisher. Maybe it's obvious but you could add in the section "Using the Slicer ROS 2 module" that first you have to do "source /opt/ros/galactic/setup.bash" in the Slicer terminal. Thanks for the help!

@javiermoviglia
Copy link
Author

I just tried it quickly on foxy with this robot https://github.com/olmerg/lesson_urdf and it works too. 👍

aravindskumar98 added a commit that referenced this issue Mar 7, 2023
Re-Designed Parameter Node, Unified Naming for Parameter Node variables and other Util functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants