Skip to content

Commit

Permalink
[Joana] Smaller bug fixes, new tendon examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jpecholt committed Jan 23, 2018
1 parent 088f6b3 commit efbb8ef
Show file tree
Hide file tree
Showing 13 changed files with 537 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ Getting started

Part 1: Run rosbridge and roboySimulation
-----------------------------------------
In case you need to change the port on which you want to operate (e.g. because it is already in use), adapt the value of the following command and make sure to also change the value in the Unity scene.

.. code:: bash
source path-to-roboy-ros-control/devel.setup.bash
roslaunch rosbridge_server rosbridge_websocket.launch
roslaunch rosbridge_server rosbridge_websocket.launch port:=9090
rosrun roboy_simulation VRRoboy
Part 2: Open the project in Unity
Expand Down
3 changes: 2 additions & 1 deletion Assets/Prefabs/Tools/HandTool.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ MeshFilter:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1871798522809786}
m_Mesh: {fileID: 0}
m_Mesh: {fileID: 4300000, guid: 3149e51e0ed38f04084995d296238179, type: 3}
--- !u!114 &114015195755441830
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -122,6 +122,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_RightHandMesh: {fileID: 4300000, guid: 3149e51e0ed38f04084995d296238179, type: 3}
m_LeftHandMesh: {fileID: 4300000, guid: 8e64d726bddfc614c890668110295789, type: 3}
m_PullForceFactor: 1000
m_RayDistance: 0.3
--- !u!114 &114984493035044586
MonoBehaviour:
Expand Down
6 changes: 3 additions & 3 deletions Assets/ROSBridgeLib/ROSBridgeWebSocketConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ public void AddSubscriber(Type subscriber)
//Multiple subscribers for the same topic possible
IsValidSubscriber(subscriber);
_subscribers.Add(subscriber);

string topic = GetMessageTopic(subscriber);

if (_running)
{
//only announce if not announced yet,
Expand Down Expand Up @@ -246,7 +246,7 @@ public void RemovePublisher(Type publisher)
//if we hvae no more publishers on this topic
if (!m_AnnouncedTopics.Contains(topic))
{
Debug.Log("[ROS WEBSOCKET] not announcing anymore on: " + topic);
//Debug.Log("[ROS WEBSOCKET] not announcing anymore on: " + topic);
_ws.Send(ROSBridgeMsg.UnAdvertise(topic));
}
}
Expand Down Expand Up @@ -296,7 +296,7 @@ public void Disconnect()
//if no more advertiser on this topic
if (!m_AnnouncedTopics.Contains(topic))
{
Debug.Log("[ROS WEBSOCKET] not publishing on topic: " + topic);
//Debug.Log("[ROS WEBSOCKET] not publishing on topic: " + topic);
_ws.Send(ROSBridgeMsg.UnAdvertise(topic));
}
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/ROSBridgeLibExtension/suscriber/PaBiPoseSubscriber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ public class PaBiPoseSubscriber : ROSBridgeSubscriber
{
public new static string GetMessageTopic()
{
return "roboy/simulation/pabi_pose";
return "/roboy/simulation/PaBiRoboy_demo_simplified_pose";
}

public new static string GetMessageType()
{
return "roboy_communication_middleware/Pose";
return "/roboy_communication_middleware/Pose";
}

public new static ROSBridgeMsg ParseMessage(JSONNode msg)
Expand Down
4 changes: 2 additions & 2 deletions Assets/ROSBridgeLibExtension/suscriber/RoboyPoseSubscriber.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using SimpleJSON;
using ROSBridgeLib.custom_msgs;

using UnityEngine;
namespace ROSBridgeLib
{
public class RoboyPoseSubscriber : ROSBridgeSubscriber
Expand All @@ -14,7 +14,7 @@ public new static string GetMessageTopic()

public new static string GetMessageType()
{
return "roboy_communication_middleware/Pose";
return "/roboy_communication_middleware/Pose";
}

public new static ROSBridgeMsg ParseMessage(JSONNode msg)
Expand Down

0 comments on commit efbb8ef

Please sign in to comment.