szandara / unity_moveit_connector

Unity script which acts as controller for Unity ArticulationBody robotics arms for a ROS moveit instance.
Apache License 2.0
6 stars 1 forks source link

Help needed with the project #1

Open MaulshreeSingh opened 1 year ago

MaulshreeSingh commented 1 year ago

Hi,

I'm trying to follow your project but implementing it on my own. When I added the ROSMoveItControllerGeneric.cs to my assets script in Unity, I'm getting these two errors:

I'm new to this. Can you please help me in figuring out what can I do to fix it?

szandara commented 1 year ago

Have you added the right libraries to Unity?

https://github.com/Unity-Technologies/ROS-TCP-Connector.git#v0.1.2 
https://github.com/Unity-Technologies/URDF-Importer.git#v0.1.2
MaulshreeSingh commented 1 year ago

yes. I have been following the Unity-Robotics-Hub tutorial too. I have been working on ABB robotic arm and trying to implement yours and that tutorial in my own project.

szandara commented 1 year ago

That's pretty odd, it seems it cannot find some URDF importer and ROS-TCP-Connector . Seems like it could be an different versions.

Can you check in your Editor files if you have RosMessageTypes and the subfolder Std?

MaulshreeSingh commented 1 year ago

I couldn't find any folder named RosMessageTypes within the project, however, there is an Std folder under the library.

Library/PackageCache/com.unity.robotics.ros-tcp-connector@c27f00c6cf/Runtime/Messages/Std

MaulshreeSingh commented 1 year ago

Hi again,

I fixed this error for "'JointTrajectory' does not exist in the namespace 'RosMessageTypes.Trajectory' (are you missing an assembly reference?)" by replacing 'JointTrajectory' with 'JointTrajectoryMsg' by referring to this file https://github.com/Unity-Technologies/ROS-TCP-Connector/blob/main/com.unity.robotics.ros-tcp-connector/Runtime/Messages/Trajectory/msg/JointTrajectoryMsg.cs

But as you can see there is no file for 'Time' here https://github.com/Unity-Technologies/ROS-TCP-Connector/tree/main/com.unity.robotics.ros-tcp-connector/Runtime/Messages/Std/msg

szandara commented 1 year ago

Are you sure you are using the correct version?

https://github.com/Unity-Technologies/ROS-TCP-Connector/blob/v0.1.2/Runtime/MessageGeneration/std_msgs/Time.cs The file is there. The ROS-TCP-Connector must be version 0.1.2

MaulshreeSingh commented 1 year ago

Hi again,

I'm still working on this project and I'm stuck again. If you could help me it will that would be great. So I have modified the Unity script based on new versions of the packages. The issue I'm facing right now is the '/move_group' node is not publishing any Joint Trajectory msgs on the '/move_group/unity_trajectory/unity_arm_controller' topic. The topic is listed on but no new msg is being published there. I have made no changes in unity_moveit_manager.cpp script and using same files(modified to my robot) as [https://github.com/szandara/unity_reachy_tutorial/tree/master/src/unity_reachy_tutorial] on the ROS side. Will you know how I can fix it, please?

szandara commented 1 year ago

JointTrajectory should be published by your moveit console. When do you expect to see JointTrajectory messages exactly? Can you share some logs?

MaulshreeSingh commented 1 year ago

here is the screenshot of Unity scene showing the connection between ros and unity Screenshot from 2023-08-23 11-54-09

joint_states of robotic arm is being published by unity for MoveIt to use

Screenshot from 2023-08-23 11-54-17 (1)

However, there is no msg being published by MoveIt in this topic

Screenshot from 2023-08-23 12-23-13

even though the info about the topic shows this

Screenshot from 2023-08-23 12-40-59

there is no problem in executing the goal Screenshot from 2023-08-23 12-40-59

now I'm not sure what's the problem. Any help will be appreciated. Thanks.

wongsinglam commented 11 months ago

@MaulshreeSingh the problem is that the version of ros tcp connector has been upgraded. Check the package and modify it, and you will get everything work.